Fixed #23914 -- Improved {% now %} to allow storing its result in the context.

Thanks to Tim for the review.
This commit is contained in:
Baptiste Mispelon 2014-11-25 19:24:57 +01:00
parent 3a9aa155e2
commit c335c0fee9
4 changed files with 31 additions and 3 deletions

View file

@ -1697,6 +1697,8 @@ class TemplateTests(TestCase):
datetime.now().day, datetime.now().month, datetime.now().year)),
'now06': ('''{% now "j 'n' Y"%}''', {}, '''%d '%d' %d''' % (
datetime.now().day, datetime.now().month, datetime.now().year)),
'now07': ('''{% now "j n Y" as N %}-{{N}}-''', {}, '''-%d %d %d-''' % (
datetime.now().day, datetime.now().month, datetime.now().year)),
### URL TAG ########################################################
# Successes