Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
>>> from django.conf import settings
>>> from django.template import Context, Template
>>> settings.DATETIME_FORMAT
'D j m Y H:i (e)'
>>> Template('{{deadline|date:"DATETIME_FORMAT"}}').render(Context({"deadline":}))
u'July 24, 2014, 11:45 a.m.'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment