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 | django
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
[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 Goog
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 fol
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 RelaxedForm
> 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
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 wo
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 For
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
> 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:
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 dd.mm
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.
Viesta
12 matches
Mail list logo