Hi,
On 18.03.2009, at 11:51, Wim Feijen wrote:
>
> Hello people,
>
> It has been over a month do I'd like to raise the same question again,
> with all due respect.
>
> Does anybody know how to control a form's output format of a stored
> DateField? Unfortunately, different countries use
> Does anybody know how to control a form's output format of a stored
> DateField? Unfortunately, different countries use different customs to
> represent dates and I'd like to represent the date in another
> international format (%d-%m-%Y). Any help would be very much
> appreciated!
I use the
/%Y",))
>>>
>>> When I go add a object in this format ("%Y/%m/%d"), the django validation
>>> validate with sucess.
>>>
>>> But when I edit my object:
>>> form = UserForm(instance=stored_user)
>>> Djan
e input_formats
>> properties to "%d/%m/%Y":
>> birth_date = forms.DateField(input_formats=("%d/%m/%Y",))
>>
>> When I go add a object in this format ("%Y/%m/%d"), the django validation
>> validate with sucess.
>>
>> But when I edit my obje
%m/%Y",))
>
> When I go add a object in this format ("%Y/%m/%d"), the django validation
> validate with sucess.
>
> But when I edit my object:
> form = UserForm(instance=stored_user)
> Django fill the DateField in this format: ("%Y-%m-%d")
>
> How I
dit my object:
form = UserForm(instance=stored_user)
Django fill the DateField in this format: ("%Y-%m-%d")
How I do to Django fill the field in this format ("%Y/%m/%d") ?
Anybody help me?
Thanks!
Edgard Matos from Brazil
--~--~-~--~~~---~--~~
Yo
6 matches
Mail list logo