Created
July 24, 2014 11:46
-
-
Save graingert/f6afcee84baa498fbcd6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> 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": datetime.datetime.now})) | |
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