Re: date format other than YYYY-MM-DD

2007-01-12 Thread Adrian Holovaty
On 1/12/07, Andres Luga <[EMAIL PROTECTED]> wrote: > Any idea if newforms simplifies this? Yes, newforms DateFields let you specify the input format(s). This has yet to be integrated into the Django admin, but it will be sooner rather than later. Adrian -- Adrian Holovaty holovaty.com |

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

Re: date format other than YYYY-MM-DD

2006-10-10 Thread Javier Rivera
[EMAIL PROTECTED] escribió: > Javier, > >Is it possible to use this with the generic view? No (AFAIK). You need to call it explicitly when processing the form. Javier. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: date format other than YYYY-MM-DD

2006-10-09 Thread [EMAIL PROTECTED]
Javier, Is it possible to use this with the generic view? Javier Rivera wrote: > viestards escribió: > >> Using the 'date' filter, you can format the output however you want, > >> within templates. > >> > >> For example, to format a date as "September 17, 2006", you would do > >> the

Re: date format other than YYYY-MM-DD

2006-09-29 Thread DavidA
viestards wrote: > thanks, suppose I have to do it this way. I just hoped to have a > sollution that works in admin pages too. 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

Re: date format other than YYYY-MM-DD

2006-09-29 Thread viestards
> I have a small function: > I use the usual form stuff. But if I detect an error on the date field > (Fecha in Spanish) I just throw the string to the previous function. If > it doesn't raise an exception I use the return to build a sting that > django will accept and call get_validation_errors

Re: date format other than YYYY-MM-DD

2006-09-29 Thread Javier Rivera
viestards escribió: >> Using the 'date' filter, you can format the output however you want, >> within templates. >> >> For example, to format a date as "September 17, 2006", you would do >> the following in a template: >> >> {{ object.pub_date|date:"F d, Y" }} > > thanks for reply, but will it

Re: date format other than YYYY-MM-DD

2006-09-28 Thread [EMAIL PROTECTED]
It is hard to use it with related objects... Inside a for loop I can´t know which original object to reference (at least with the template language) and if I use the for to loop through the original object instead of the form, I have to use it for all other fields of the form, with no help for

Re: date format other than YYYY-MM-DD

2006-09-27 Thread Don Arbow
This was answered here last month:http://groups.google.com/group/django-users/browse_frm/thread/f0e7d503401a7186/1d378aa769159983?#1d378aa769159983As Jay mentioned, you need to use the object value, not the formfield. The date filter requires a datetime instance, which the formfield is not  and so

Re: date format other than YYYY-MM-DD

2006-09-27 Thread viestards
> Using the 'date' filter, you can format the output however you want, > within templates. > > For example, to format a date as "September 17, 2006", you would do > the following in a template: > > {{ object.pub_date|date:"F d, Y" }} thanks for reply, but will it work on forms? Right now I get:

Re: date format other than YYYY-MM-DD

2006-09-27 Thread Jay Parlar
On 9/27/06, viestards <[EMAIL PROTECTED]> wrote: > > Hi everyone! > > As far as I know date format is hardcoded into Django as -MM-DD. > Is there any way to change it globally? > If not what is best way to change date format in forms to other? For > now, I change date format in view from

date format other than YYYY-MM-DD

2006-09-27 Thread viestards
Hi everyone! As far as I know date format is hardcoded into Django as -MM-DD. Is there any way to change it globally? If not what is best way to change date format in forms to other? For now, I change date format in view from dd.mm. but I doubt it's the best way to do such things.