On 25/06/2012 6:51pm, ledzgio wrote:
> How can I change default project/app date format to dd-mm-YYYY?
This is straight from the Python 2.7 docs.
>>>import datetime
>>>d = datetime.datetime(2010, 7, 4, 12, 15, 58)
>>> '{:%Y-%m-%d%H:%M:%S}'.format(d)
'2010-07-04 12:15:58'
or in a template ...
https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
hth
Mike
>
> thanks
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/Z3fcdtqKpvYJ.
> To post to this group, send email to django...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscribe@googlegroups.com.
> django-users+unsubscribe@googlegroups.com.
> django-users+unsubscribe@googlegroups.com.
> django-users+unsubscribe@googlegroups.com.
> django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/oJN-bubQ5v4J.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
# path to custom localizations formats
FORMAT_MODULE_PATH = 'custom_formats'