On 9/27/06, viestards <[EMAIL PROTECTED]> wrote:
>
> Hi everyone!
>
> As far as I know date format is hardcoded into Django as YYYY-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.yyyy but I doubt it's the
> best way to do such things.

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" }}

Jay P.

--~--~---------~--~----~------------~-------~--~----~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to