Re: date format other than YYYY-MM-DD

2007-01-12 Thread Andres Luga
Hi, Any idea if newforms simplifies this? Regards, Andres On 9/29/06, DavidA <[EMAIL PROTECTED]> wrote: > I also ran into this problem so I did it that hard way: I created a > custom model DateField and a custom form DateField. (I call them > RelaxedModelDateField and RelaxedFormDateField mean

Full table fetches behind the scenes

2006-11-03 Thread Andres Luga
Hi, I have a problem - when creating an object, Django performs full table SELECT from multiple tables and multiple times. Why? I've set up MySQL to log all queries to the database. In Django I'm using generic views. I have the following models/tables: 1. Firm 2. Person ( ForeignKey( Firm )) 3.

Re: automatically fill in some fields of a form, storing authenticated user

2006-09-25 Thread Andres Luga
Hi, the following are the suggestions of a Python and Django newbie, so take with a load of salt. Also the examples are not direct copy-paste and therefore might not work directly. On 9/22/06, Benedict Verheyen <[EMAIL PROTECTED]> wrote: > then data is looked up in another database and some of th

Re: Uploading Files

2006-09-10 Thread Andres Luga
Hi, relarted to this topic. When using generic views, how to achieve that the file doesn't get overwritten? For example a form for editing a person: the image file field has no default data and when I only change the name the image is blanked. It seems I missed something.. Regards, Andres > htt

Filter "date" and FormFieldWrapper attribute error

2006-08-26 Thread Andres Luga
Hi, when displaying a form for a new object, I'm trying to set a default value for a date field using a filter in a template, like so: {{ form.somefield|date:"Y-m-d" }} This gives me an error: 'FormFieldWrapper' object has no attribute 'year'. What am I doing wrong (I'm using generic views)?

Generic views and manipulating data before saving

2006-08-26 Thread Andres Luga
Hi, I've spent many hours trying to get the following to work (I'm not blaming Django - I'm very new to Python and Django, it was late etc). To hopefully make the solution easier to find in Google, I write it here. Suggestions for improvement are welcome. Question: using generic views, how to al

Authentication, error "DoesNotExist at /accounts/login/", part 2

2006-08-14 Thread Andres . Luga
Hi, the following happened to me also: 1. Created a new site 2. Removed example.com from the list of sites 3. Tried to use authentication and got the error "DoesNotExist at /accounts/login/" 4. Deleted and rebuilt the database, authentication works. Regards, Andres blue_beastie wrote on 29 Jun 2