#15263: "now" templatetag doesn't accept locale formats, as docs claim
-----------------------------+----------------------------------------------
 Reporter:  danielr          |          Owner:  nobody    
   Status:  new              |      Milestone:            
Component:  Template system  |        Version:  SVN       
 Keywords:                   |   Triage Stage:  Unreviewed
Has patch:  1                |  
-----------------------------+----------------------------------------------
 The documentation on the `now` tag claims that it acts like the `date`
 filter in accepting "DATE_FORMAT" as a shortcut to the locale's current
 date format. However, this is not the case:

 {{{
 >>> t=Template("""{% now "DATE_FORMAT" %}""")
 >>> t.render(Context())
 u'WedPMGMTE_February+0000RFebPMGMT'
 }}}

 Clearly the string is being interpreted as a literal format, instead of
 being translated to the locale's date format.

 Attached patch fixes this by using the same logic as the `date` filter,
 including a regression test, and slightly tweaks the awkward wording in
 the docs.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/15263>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to