Re: newforms - filling a custom form with data from a model instance

2007-03-07 Thread anders conbere
You're actually looking for the "initial" parameter of the form initialization function. This is a dict you can pass to the form to set the "initial" data. so in your example you would want to pass to the form something like m = MyModel.objects.get(pk=1) f = MyForm(initial = {'field1': m.field1

Re: newforms - filling a custom form with data from a model instance

2007-03-07 Thread orestis
What I have done is this: @classmethod def load_from_model(clazz, model): data = {} fields = clazz.base_fields for field in fields.keys(): try: data[field]=getattr(model,field) except AttributeError: print fie

newforms - outputting dates in the same format as input

2007-03-07 Thread orestis
As it stands, the when using a newforms.DateField with specified input formats, it gets parsed alright, but when rendering the form there is no way to specify the output format, it gets printed as -MM-DD. This not only is a bad localization practice, it makes _using_ the input formats impossi

Re: newforms - filling a custom form with data from a model instance

2007-03-07 Thread orestis
Duh! I didn't know there was a __dict__ available on a model :) Maybe this code can be made simpler. On Mar 7, 10:32 am, "orestis" <[EMAIL PROTECTED]> wrote: > What I have done is this: > > @classmethod > def load_from_model(clazz, model): > data = {} > fields = clazz.base

Re: uploding image file

2007-03-07 Thread samira
Thanks a lot, I mix your solution and my problem fixed:-) Have good time On Mar 6, 4:16 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > You don't have to use the ImageField if you just want to upload it the > old python way, you can just store the filename in a textfield...I > gave a sample

Re: Templatedb problem

2007-03-07 Thread Mary
Dear Malcom; I have commented this line #from template.models import Template in template/loaders/database.py and it works fine with but i don't know if it will affect any of the functionality or not also my setting.py is : TEMPLATE_LOADERS = ( 'django.template.loaders.filesystem.load_templa

why do I need two paths specified for PythonPath in httpd.conf?

2007-03-07 Thread char
Just wondering about something. When configuring PythonPath in httpd.conf to get mod_python to work with Apache, is it normal to have to specify both the directory that contains your project directory as well as the project directory itself? I had to in order to get everything to work. I also noti

Testing and error handling

2007-03-07 Thread Lawrence Oluyede
I'm having some problems with the same codebase tested with Python 2.5 and previous versions. With Python 2.5 the tests pass smoothly but with 2.4 and 2.3 they "explode". The problem seems to arise when the application raises an exception due to bad behavior. Python 2.5 gets back a HTTP 500 (that

Django installation on dreamhost

2007-03-07 Thread Equerm
Hi, I'm working on installing Django on my dreamhost domain, and I have followed Jeff Croft's guide (http://www2.jeffcroft.com/2006/may/ 11/django-dreamhost/), I've retryed 4-5 times now and I get the same error every time, when I enter the URL to my domain (http:// django.gigzor.com) i just get a

Re: newforms - outputting dates in the same format as input

2007-03-07 Thread Frankie Robertson
On 07/03/07, orestis <[EMAIL PROTECTED]> wrote: > > As it stands, the when using a newforms.DateField with specified input > formats, it gets parsed alright, but when rendering the form there is > no way to specify the output format, it gets printed as -MM-DD. > > This not only is a bad locali

Re: why do I need two paths specified for PythonPath in httpd.conf?

2007-03-07 Thread Malcolm Tredinnick
On Wed, 2007-03-07 at 02:16 -0800, char wrote: > Just wondering about something. When configuring PythonPath in > httpd.conf to get mod_python to work with Apache, is it normal to have > to specify both the directory that contains your project directory as > well as the project directory itself? I

Re: Testing and error handling

2007-03-07 Thread Malcolm Tredinnick
On Wed, 2007-03-07 at 02:24 -0800, Lawrence Oluyede wrote: > I'm having some problems with the same codebase tested with Python 2.5 > and previous versions. With Python 2.5 the tests pass smoothly but > with 2.4 and 2.3 they "explode". The problem seems to arise when the > application raises an ex

Signals for User model

2007-03-07 Thread Aidas Bendoraitis
I've never used signals before and I think I came to a point when I need to start doing that. What I need is to call some function just after the User is saved. According to the docs that I found about signals, I should do something like: # --- code --- # from django.contrib.auth.models import

Re: Templatedb problem

2007-03-07 Thread Malcolm Tredinnick
On Wed, 2007-03-07 at 01:41 -0800, Mary wrote: > Dear Malcom; > > I have commented this line #from template.models import Template > in template/loaders/database.py > > and it works fine with but i don't know if it will affect any of the > functionality or not That's not a good idea. It will br

Re: newforms - outputting dates in the same format as input

2007-03-07 Thread orestis
Here it is: http://code.djangoproject.com/ticket/3672 On Mar 7, 12:42 pm, "Frankie Robertson" <[EMAIL PROTECTED]> wrote: > On 07/03/07, orestis <[EMAIL PROTECTED]> wrote: > > > > > As it stands, the when using a newforms.DateField with specified input > > formats, it gets parsed alright, but whe

Re: Signals for User model

2007-03-07 Thread Malcolm Tredinnick
On Wed, 2007-03-07 at 11:58 +0100, Aidas Bendoraitis wrote: > I've never used signals before and I think I came to a point when I > need to start doing that. > > What I need is to call some function just after the User is saved. > > According to the docs that I found about signals, I should do s

newforms and encoding problems

2007-03-07 Thread Nuno Mariz
Hi, Although seems that are a patch for this problem, the newforms continues with the same problem. I have a field that the user fills with: João Ratão In the database shows: Jo? Rat This behavior happens only in the latest trunk, in the old an unicode exception was raised. In the Admin interface

Re: Django installation on dreamhost

2007-03-07 Thread chasfs
Can you set up your env so it it matches what fcgi has and then run manage.py shell? If that works, use the shell to try to access the database. The other thing that might help is to look at the logs, likely in ~/logs/django.gigzor.com. Thanks, -chasfs http://zdecisions.com On Mar 7, 5:35 am,

Bill Gates thinks Google should be worried!

2007-03-07 Thread alex
Hello Friends, Please go through the text. Bill Gates thinks Google should be worried! --- You must have heard by now about Agloco and how many people think it is going to be bigger than Google... Now Bill Gates is on record saying they have a great busine

Re: Designing URLs

2007-03-07 Thread Filipe Correia
Sounds good, but I haven't fully understood the snippet (sory, I haven't looked at django's middleware before). How would one "pick" between appending or not appending slashes following this approach? Meanwhile I made a few searches for the current behavior of the APPEND_SLASH setting and found t

Re: connecting to multiple databases

2007-03-07 Thread Ewout ter Haar
That looks very interesting, Michal. Thank you very much. As soon as I have some time I will try it out. (My original problem went away by itself, but I am sure this will come in handy sometime.) Ewout --~--~-~--~~~---~--~~ You received this message because you ar

Re: fixtures ?

2007-03-07 Thread Russell Keith-Magee
On 3/7/07, akonsu <[EMAIL PROTECTED]> wrote: > > hello, > > i am using fixtures for site deployment. it would be perfect if i > could pull large amounts of data for fields in to my fixtures file > from external files. say, for example, my models have text fields that > contain html markup. i am pr

Re: ./manage flush --noinput

2007-03-07 Thread Russell Keith-Magee
On 3/7/07, akonsu <[EMAIL PROTECTED]> wrote: > > hello, > > is there a way to automate creation of administrator role for > django.contrib.admin application? > > if i run "./manage flush --noinput" it does not create one. Create an initial_data fixture that contains the definition for an admin us

Re: Initial data for Flatpages?

2007-03-07 Thread Russell Keith-Magee
On 3/4/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I am looking for some way to add initial Flatpages data to my app. I > am open to either SQL or Django ORM. The pattern of /sql/ > .sql doesn't seem to apply to Flatpages. How can I do > this? In the current Django trunk, you can also

Re: newforms - outputting dates in the same format as input

2007-03-07 Thread Jure Čuhalev
On 3/7/07, orestis <[EMAIL PROTECTED]> wrote: > > As it stands, the when using a newforms.DateField with specified input > formats, it gets parsed alright, but when rendering the form there is > no way to specify the output format, it gets printed as -MM-DD. > > This not only is a bad localiza

Re: dojo problem

2007-03-07 Thread Nathan R. Yergler
On 3/6/07, Mary <[EMAIL PROTECTED]> wrote: > > here is my model : > text = models.TextField(help_text='Rich Text Editing.') > class Admin: > js = ['js/admin/AddRichTextEditing.js'] > > list_display = ('title','owner','time_created') > > i have added the dojo folder in my me

Django ORM and Atomic Commit and Rollback

2007-03-07 Thread johnny
I have to update two models at the same time, if one model update fails, I need to rollback the transactions. How do you do this in Django ORM. Thank you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django us

Re: Django ORM and Atomic Commit and Rollback

2007-03-07 Thread Matt H
I use the decorators: from django.db import transaction @transaction.commit_on_success def create_order(request, customer_id): # code to create the form and etc. # ... order = Order() order.customer = get_object_or_404(Customer, pk=customer_id) order.save() order_note = Or

Re: Manually runing daily_cleanup.py

2007-03-07 Thread Jeremy Dunck
On 3/6/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > It appears my thick-headedness is acting up again. How would I go > about adding that from the command line? How DOES one run > daily_cleanup.py? I'd do something like this: DJANGO_SETTINGS_MODULE=your.settings python /path/to/django/bi

HOT PICS OF INDIAN BABES

2007-03-07 Thread hot babe
HOT PICS OF INDIAN BABES http://bollywoodactress.blogspot.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe fro

Re: Signals for User model

2007-03-07 Thread Aidas Bendoraitis
Thanks! I put the function just in the file of one of the models (it is used for handling the signal) and it worked perfectly. I just came to an idea that the pre_init and post_init signals could be used to extend contributed models without modifying their files. The question that cames to my min

New framework configuration

2007-03-07 Thread jlnn
We're trying to set up a framework for our developers. We're using a standard install of RHEL ES4. If we modify the configuration to use Python 2.4 the admin tools break and RedHat won't support the installation. We've tried using Python 2.3, but a recent bug, according to our development manager,

Django keeps growing, performance keeps dropping

2007-03-07 Thread [EMAIL PROTECTED]
My site just keeps getting bigger and bigger, and the performance has gotten excruciatingly slow. I think the problem lies in the forum (a modified Myghtyboard install) and in it's relationship to users. Since both forum posts and users keeps growing, I wonder if I've created some sort of exponen

Re: New framework configuration

2007-03-07 Thread Nathan R. Yergler
I'm not sure I fully understand the question, but why not just build Python from source in something like /usr/local/python244? Nathan On 3/7/07, jlnn <[EMAIL PROTECTED]> wrote: > > We're trying to set up a framework for our developers. We're using a > standard install of RHEL ES4. If we modify

Re: django on mediatemple (dv) box?

2007-03-07 Thread Brian Rosner
On 2007-03-06 20:51:14 -0700, "leland" <[EMAIL PROTECTED]> said: > > joe - thanks for the tip. turns out it wasn't including the > vhosts.conf file. so i got everything to work on mediatemple's (dv) > 3.0 server. now, i've run into another issue. my company runs a (dv) > 2.0 box that came standa

Django dev ProgrammingError 1064 MySQLdb/connections.py

2007-03-07 Thread johnny
There seem to be an error I am getting in Dev Version of Django, I just updated 1/2 hr ago. It's related to model back tracking, retrieving foreign key related objects, line 31: p.question_set.all, in template. ProgrammingError at /post/1/ (1064, "You have an error in your SQL syntax; check the

Re: Django keeps growing, performance keeps dropping

2007-03-07 Thread akonsu
Hello, may be your data model is not optimal? too many relations? relations are too complex? konstantin On Mar 7, 10:26 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > My site just keeps getting bigger and bigger, and the performance has > gotten excruciatingly slow. > > I think the proble

Re: Django keeps growing, performance keeps dropping

2007-03-07 Thread Michael Radziej
[EMAIL PROTECTED]: > My site just keeps getting bigger and bigger, and the performance has > gotten excruciatingly slow. - database needs indexes? - check how many queries your views generate. Perhaps you need reorganization or select_related. -- noris network AG - Deutschherrnstraße 15-19 - D-

Help with mod_python and apache2 on Edgy Ubuntu with Django 0.95.1

2007-03-07 Thread Ryan Alexander
I've gotten pretty much everything else done, but I can't figure out how to tell mod_python where my django install directory is. The current directory is /opt/perfmanager but I can't figure out what to do past that. I've tried changing the path to contain those directories but it's still not fi

Re: Django keeps growing, performance keeps dropping

2007-03-07 Thread [EMAIL PROTECTED]
It's entirely possible my data relations aren't optimal. The database may need indexes, I may be making too many queries. All of these are very good possibilities. Problem is, I don't really know where to begin checking this stuff. Obviously, I'm in over my head, but I'm trying to learn to swim he

Re: Help with mod_python and apache2 on Edgy Ubuntu with Django 0.95.1

2007-03-07 Thread akonsu
hello, your error output shows that it did find django installation in the egg in site-packages. do you mean that you have a separate installation that you want to use? konstantin On Mar 7, 10:56 am, "Ryan Alexander" <[EMAIL PROTECTED]> wrote: > I've gotten pretty much everything else done, but

Re: dojo problem

2007-03-07 Thread Mary
I have really tried with dojo and i worked with this steops exactly http://code.djangoproject.com/wiki/AddDojoEditor and i didn't see anything in my text Area field I have django 0.95.1 i have installed dojo 0.4 Can anyone help please as i spent a lot of time to know what is the problem with not

Bill Gates thinks Google should be worried!

2007-03-07 Thread alex
Hello Friends, Please go through the text. Bill Gates thinks Google should be worried! --- You must have heard by now about Agloco and how many people think it is going to be bigger than Google... Now Bill Gates is on record saying they have a great busine

Re: New framework configuration

2007-03-07 Thread James Bennett
On 3/7/07, jlnn <[EMAIL PROTECTED]> wrote: > We're trying to set up a framework for our developers. We're using a > standard install of RHEL ES4. If we modify the configuration to use > Python 2.4 the admin tools break and RedHat won't support the > installation. We've tried using Python 2.3, but

Re: Django keeps growing, performance keeps dropping

2007-03-07 Thread James Bennett
On 3/7/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I think the problem lies in the forum (a modified Myghtyboard install) > and in it's relationship to users. Since both forum posts and users > keeps growing, I wonder if I've created some sort of exponential > growth situation for myself.

Re: New framework configuration

2007-03-07 Thread jlnn
We were hoping to avoid that, because we have multiple development/ test and production servers that need to be configured exactly the same. Standard configs is the best way to ensure that. On Mar 7, 10:37 am, "Nathan R. Yergler" <[EMAIL PROTECTED]> wrote: > I'm not sure I fully understand the qu

Re: Django keeps growing, performance keeps dropping

2007-03-07 Thread [EMAIL PROTECTED]
Sounds good. How does one go about profiling? Is there a tutorial or something you can point me to? Also, I appreciate everyone's patience with these dumb and vague questions. It's frustrating being a stupid newbie. For what it's worth, I have found some things, most notably that I was - for wha

Re: django on mediatemple (dv) box?

2007-03-07 Thread leland
brian - thanks for that info! i recompiled mod_python (made a backup first), but when i try to restart apache i get this error: Cannot load /etc/httpd/modules/mod_python.so into server: /etc/httpd/ modules/mod_python.so: undefined symbol: apr_table_compress i've seen on some other forums that my

Re: Help with mod_python and apache2 on Edgy Ubuntu with Django 0.95.1

2007-03-07 Thread Ryan Alexander
Thanks for the help! I think I got it working now, but I need to get a user-name and password for MySQL set up properly. On 07/03/07, akonsu <[EMAIL PROTECTED]> wrote: > > hello, > > your error output shows that it did find django installation in the > egg in site-packages. do you mean that you

Re: creating a website log

2007-03-07 Thread Patrick
Thanks! Looks interesting. I was thinking of creating a ActionLog-like model and storing the log in db instead of a log file. On Mon, 05 Mar 2007 18:41:30 -0800, Rubic wrote: > My solution is this: I've ripped out some stuff from the old admin code > and written AppLogModel with three method

Re: Django keeps growing, performance keeps dropping

2007-03-07 Thread Frank Tegtmeyer
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > For what it's worth, I have found some things, most notably that I was > - for whatever reason - cycling through every post for every topic > when I built the topic list. That might be slowing things down a bit. Such things are the reason for bad

Re: Django keeps growing, performance keeps dropping

2007-03-07 Thread maeck
First, what database platform do you use: MySQL or Postgres. MySQL has ways of logging slow queries (see /etc/mysql/my.cnf), this will give you an understanding of which queries are slow and you may be able to add indices where necessary. Secondly, if you use PHPmyAdmin it can tell you what tunin

Python HTML lib_filter

2007-03-07 Thread Sam
I have translated Cal Henderson's lib_filter.php to python. If you need to filter your users HTML input, you might like it. http://amisphere.com/contrib/python-html-filter/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Django keeps growing, performance keeps dropping

2007-03-07 Thread Jeremy Dunck
On 3/7/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Sounds good. How does one go about profiling? Is there a tutorial or > something you can point me to? If you're on Linux and Apache, you'll like this: http://www.rkblog.rk.edu.pl/w/p/django-profiling-hotshot-and-kcachegrind/ --~--~-

Thanks guys and a little help again :)

2007-03-07 Thread Gerard M
Thanks a lot Carole and Todd your posts have been so helpful to me, I've managed to upload a file !!!, but I have a little problem now, I would like to see if any of you or somebody else who reads this can help me, the issue is : I can upload small files good, but when it comes to bigger files, le

Re: my first patch: template if[not]equal with negative numbers

2007-03-07 Thread Bram - Smartelectronix
Malcolm Tredinnick wrote: > On Wed, 2007-03-07 at 02:34 +0100, Bram - Smartelectronix wrote: >> Malcolm Tredinnick wrote: >>> (2) This is the sort of thing that should come with a test to ensure we >>> don't introduce the same mistake again. Have a look in >>> tests/regressiontests/templates/tests

Re: my first patch: template if[not]equal with negative numbers

2007-03-07 Thread Bram - Smartelectronix
Bram - Smartelectronix wrote: > > > Any hints? looks like SmileyChris got ahead of me and did all the fix'n, but i guess i'd still like to know so i can prepare future patches better. - bram --~--~-~--~~~---~--~~ You received this message because you are s

Re: why do I need two paths specified for PythonPath in httpd.conf?

2007-03-07 Thread char
I haven't had a chance to test this yet but I'll bet this is my problem. Thanks. On Mar 7, 2:45 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Wed, 2007-03-07 at 02:16 -0800, char wrote: > > Just wondering about something. When configuring PythonPath in > > httpd.conf to get mod_python to

Re: Please

2007-03-07 Thread Gerard M
Thanks a lot Carole and Todd your posts have been very helpful to me, I've managed to upload a file !!!, but I have a little problem now, I would like to see if any of you or somebody else who reads this can help me, the thing issue is : I can upload small files good, but when it comes to bigger f

Re: Python HTML lib_filter

2007-03-07 Thread Bram - Smartelectronix
Sam wrote: > I have translated Cal Henderson's lib_filter.php to python. > > If you need to filter your users HTML input, you might like it. > > http://amisphere.com/contrib/python-html-filter/ this is pretty much exactly what i had been looking for lately... one thing: perhaps it would be wi

Any HTML to Latex module available in Python that can be integrated into Django

2007-03-07 Thread Ramdas S
Hi, I have a web site, which needs to output HTML content as Latex Ramdas S --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To

trying to translate a join query to django

2007-03-07 Thread hotani
This is the table (model) setup: [county] (list of counties) [office] (list of offices) [active counties] (a relational table with a county_id, office_id and 'active' column) [division] (columns: 'name', 'county_id' which points to the first county table) Obviously the division table is directly

Re: Python HTML lib_filter

2007-03-07 Thread James Bennett
On 3/7/07, Bram - Smartelectronix <[EMAIL PROTECTED]> wrote: > this is pretty much exactly what i had been looking for lately... It's also worth pointing out that Django includes a "striptags" template filter which strips all HTML tags, and that python-markdown has a "safe mode" which strips raw

Re: Python HTML lib_filter

2007-03-07 Thread Bram - Smartelectronix
Bram - Smartelectronix wrote: > Sam wrote: >> I have translated Cal Henderson's lib_filter.php to python. >> >> If you need to filter your users HTML input, you might like it. >> >> http://amisphere.com/contrib/python-html-filter/ > one thing: perhaps it would be wise to create some unit tests fo

Re: Python HTML lib_filter

2007-03-07 Thread Bram - Smartelectronix
James Bennett wrote: > On 3/7/07, Bram - Smartelectronix <[EMAIL PROTECTED]> wrote: >> this is pretty much exactly what i had been looking for lately... > > It's also worth pointing out that Django includes a "striptags" > template filter which strips all HTML tags, and that python-markdown > has

Re: disorderly order_by

2007-03-07 Thread Todd O'Bryan
Ahhh. The real, honest-to-goodness *table* name in the db. Thanks! On Tue, 2007-03-06 at 21:39 -0300, Ramiro Morales wrote: > On 3/6/07, Todd O'Bryan <[EMAIL PROTECTED]> wrote: > > > I'm trying to get all the grades that belong to a certain student in a > > certain section and order them by whe

Re: Thanks guys and a little help again :)

2007-03-07 Thread [EMAIL PROTECTED]
Basically, as it stands today, Django is not very good at uploading large files because it holds the whole file in memory while it uploads it. There's no simple answer to the problem, although if you search the group for "uploading large files" you should find some more info. On Mar 7, 12:07 pm,

Looking for Django Consultants

2007-03-07 Thread hnaraghi
Hello all, I apologize in advance if this is not the right place. A Django king recommended that I post here. I am the founder of a start-up in Silicon Valley building a social- networking platform in the fields of sports. We have used Django platform for our prototype modeling and basically be

Api and user auth

2007-03-07 Thread Grupo Django
Hello, I have two questions: -Where can I browse the django API? - I have made a news app. One of the fields is author, i want to set its default value to the username logged in the admin zone. How could I do it? What do I have to import to use request.username? so I would do: default= request.u

Re: Python HTML lib_filter

2007-03-07 Thread Jay Parlar
On 3/7/07, Sam <[EMAIL PROTECTED]> wrote: > > I have translated Cal Henderson's lib_filter.php to python. > > If you need to filter your users HTML input, you might like it. > > http://amisphere.com/contrib/python-html-filter/ > Looks good, I'll have to play with it later. One quick thing though

Re: Django keeps growing, performance keeps dropping

2007-03-07 Thread Karsu
Hello, First, If you use many relations it is very important to use JOIN like: Example.objects.filter(first_object__second__third=something) It is important to use select_related too (also in template!!) example: {% for item in example.objects.all %} {{ item.related_object.value }} {% endfo

Re: Django keeps growing, performance keeps dropping

2007-03-07 Thread [EMAIL PROTECTED]
On a more specific note, I'm finding lots of places I've done something like: if request.user.is_authenticated() and request.user.is_staff): It seems to me there's a redundant check being made there. Wouldn't one have to be authenticated for is_staff to evaluate to true, meaning I can safely just

Re: Django keeps growing, performance keeps dropping

2007-03-07 Thread akonsu
i do not know the answer to your question, but it reminded me that there is a decorator like @login_required or something that you could use in stead of checking your self. (if it applies to your case). konstantin On Mar 7, 4:18 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On a more spec

Re: Django keeps growing, performance keeps dropping

2007-03-07 Thread Bren
Personally, I would not get into those details until you profile your database. Like someone else said, if you're using MySQL turn on the slow query log. If you run Postgres I'm sure you can find plenty of documentation about how to monitor and tune that. I just did this and found two queries that

Re: Please

2007-03-07 Thread [EMAIL PROTECTED]
Posted reponse in your other post ... saw it before this... On Mar 7, 1:05 pm, "Gerard M" <[EMAIL PROTECTED]> wrote: > Thanks a lot Carole and Todd your posts have been very helpful to me, > I've managed to upload a file !!!, but I have a little problem now, I > would like to see if any of you o

Re: Django keeps growing, performance keeps dropping

2007-03-07 Thread [EMAIL PROTECTED]
Bren, I hear ya, but I'm finding a lot of easy fixes while I really pick through my (not-very-good) code. It's been pretty instructional. Thanks to everyone for your suggestions. Lots to chew on here. On Mar 7, 3:50 pm, "Bren" <[EMAIL PROTECTED]> wrote: > Personally, I would not get into those

Re: Python HTML lib_filter

2007-03-07 Thread Sam
I have updated the script to version 1.15.2 ( i started at the translation version ) with two other features: - turn text URLs into clickable URLs http://www.djangoproject.com/ becomes http://www.djangoproject.com/ - blacklist regexp URLs filter.forbidden_urls = ( r'^/delete-account/', ) Click t

Video uploading and converting - queue system?

2007-03-07 Thread Henrik Lied
Hi there, I'm creating a video upload feature for a social network. The uploaded video gets converted to Flash Video (flv) using mencoder. I need some input on how to convert the video. As it is now, I'm just converting the file directly after the original file is saved (via os.system). The prob

Re: Python HTML lib_filter

2007-03-07 Thread [EMAIL PROTECTED]
Sam, there's a filter for clickable URLs built-into Django, too. Smacked my head when I found that one. On Mar 7, 4:44 pm, "Sam" <[EMAIL PROTECTED]> wrote: > I have updated the script to version 1.15.2 ( i started at the > translation version ) with two other features: > > - turn text URLs into c

Re: Python HTML lib_filter

2007-03-07 Thread Sam
HTML Filter allows you to only accept specific protocols for html links ( href, src ) self.allowed_protocols = ( 'http', 'ftp', 'mailto', ) so it will only parse clickable urls for those protocol. I will have a look at django's regexp but i had to red

Re: Video uploading and converting - queue system?

2007-03-07 Thread akonsu
hello, but the user will have to wait anyway until the file is processed, no matter what approach you take. i think what you are doing now is fine. it may even be better because this way the wait time might be shorter compared to the cron job that migh ttake a while to get to the file. konstanti

Re: Python HTML lib_filter

2007-03-07 Thread Sam
You can see the power of "HTML Filter" by looking at the unit tests. http://amisphere.com/contrib/python-html-filter/html-filter-test.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To po

Re: my first patch: template if[not]equal with negative numbers

2007-03-07 Thread Malcolm Tredinnick
On Wed, 2007-03-07 at 19:07 +0100, Bram - Smartelectronix wrote: > Malcolm Tredinnick wrote: > > On Wed, 2007-03-07 at 02:34 +0100, Bram - Smartelectronix wrote: > >> Malcolm Tredinnick wrote: > >>> (2) This is the sort of thing that should come with a test to ensure we > >>> don't introduce the s

Admin interface

2007-03-07 Thread Arafel
Hello all, Is there a way to change the entry fields in the admin site? for example how do i change a field to a entry/text box like the one i'm typing in now rather than a text entry field? Thanks. --~--~-~--~~~---~--~~ You received this message because you are

Marking a DateField event as "repeating"

2007-03-07 Thread Jay Parlar
So I'm working on a calendar application, and trying to come up with an efficient way to mark some event as repeating. The trivial way to create the model would be something like: REPEAT = ( ('D', 'Daily'), ('W', 'Weekly'), ('M', 'Monthly'), ('Y', 'Yearly'), ) class Event(models

Re: Django installation on dreamhost

2007-03-07 Thread gordyt
Howdy Equerm, I have some notes posted on using Django with Dreamhost here: http://www.gordontillman.info/Development/DjangoDreamhost --gordy --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group.

www.OutpatientSurgicare.com/video/

2007-03-07 Thread [EMAIL PROTECTED]
www.OutpatientSurgicare.com/video/ Outpatient Doctors Surgery Center is committed to offering the healthcare the community needs. We offer patients a meaningful alternative to traditional surgery. This state-of-the-art outpatient surgery center, located in the heart of Orange County, at 10900 Warn

Re: django on mediatemple (dv) box?

2007-03-07 Thread Brian Rosner
On 2007-03-07 09:49:48 -0700, "leland" <[EMAIL PROTECTED]> said: > > brian - thanks for that info! i recompiled mod_python (made a backup > first), but when i try to restart apache i get this error: > > Cannot load /etc/httpd/modules/mod_python.so into server: /etc/httpd/ > modules/mod_python.s

Re: Marking a DateField event as "repeating"

2007-03-07 Thread Rubic
On Mar 7, 7:33 pm, "Jay Parlar" <[EMAIL PROTECTED]> wrote: > When I render a calendar, I render one month at a time. Any > suggestions on an efficient way to query the db for all the events in > a given month? I don't know enough about your calendar application, but since we're talking about RFC

Re: Marking a DateField event as "repeating"

2007-03-07 Thread Malcolm Tredinnick
On Wed, 2007-03-07 at 20:33 -0500, Jay Parlar wrote: > So I'm working on a calendar application, and trying to come up with > an efficient way to mark some event as repeating. > > The trivial way to create the model would be something like: > > REPEAT = ( > ('D', 'Daily'), > ('W', 'Weekl

Re: Marking a DateField event as "repeating"

2007-03-07 Thread Jay Parlar
On 3/7/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > This shouldn't be too hard to do (it was a fun problem to think about > over lunch). I would create a method on the model that takes a date > (what you are really interested in is the month and year) and returns a > list of the dates in th

Re: Marking a DateField event as "repeating"

2007-03-07 Thread Malcolm Tredinnick
On Wed, 2007-03-07 at 22:45 -0500, Jay Parlar wrote: [...] > I'm not quite understanding part of your first paragraph though: "I > would create a method on the model that takes a date (what you are > really interested in is the month and year) and returns a list of the > dates in that month when t

Re: Marking a DateField event as "repeating"

2007-03-07 Thread Jay Parlar
On 3/7/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > Sorry, I skipped the first step in the reasoning because I thought it > was obvious. My bad. > > Except for events that repeat only yearly, every single one of your > events is going to occur at least once in any given month. The only > ex

Re: Marking a DateField event as "repeating"

2007-03-07 Thread Malcolm Tredinnick
On Wed, 2007-03-07 at 23:09 -0500, Jay Parlar wrote: > On 3/7/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > Sorry, I skipped the first step in the reasoning because I thought it > > was obvious. My bad. > > > > Except for events that repeat only yearly, every single one of your > > events

Intializing newforms Form objects

2007-03-07 Thread anders conbere
The initial parameter in the newforms Form constructor is a dict that matches form field names to their respective initial values. This makes great sense with simple one to one mappings, however I've been struggling to find what kind of objects it expects for items such as manyToMany fields oneTo

All about AGLOCO

2007-03-07 Thread alex
Hi Friends, This note is mainly to offer you a chance to help build AGLOCO - it is a Member-owned Internet community. Here is why I would like you to help. First - it is free. Second - it is quick and easy to join. Third - AGLOCO's purpose is to get its members their share of the money genera

Re: Python HTML lib_filter

2007-03-07 Thread simonbun
Good stuff! I am going to be needing this at some point and now i have a good base to start from. I have one enhancement that is very important to me (and should be to everyone). Seeing as this is the type of filter that would be used in blog comments for example, i would add a rel="nofollow" att

Re: Marking a DateField event as "repeating"

2007-03-07 Thread Gary Doades
I'm working on this very problem. The best way I have found so far is to use the rrule stuff from the python-dateutil package. Given a repeat interval such as DAILY, WEEKLY, MONTHLY etc. it can generate all the dates that your event occurs on between two dates. It will even generate for just