Ticket #7293: 7293.patch
File 7293.patch, 1.0 KB (added by , 16 years ago) |
---|
-
django/template/__init__.py
467 467 >>> len(fe.filters) 468 468 2 469 469 >>> fe.var 470 'variable'470 <Variable: 'variable'> 471 471 472 472 This class should never be instantiated outside of the 473 473 get_filters_from_token helper function. … … 598 598 a hard-coded string (if it begins and ends with single or double quote 599 599 marks):: 600 600 601 >>> c = {'article': {'section': 'News'}}601 >>> c = {'article': {'section':u'News'}} 602 602 >>> Variable('article.section').resolve(c) 603 603 u'News' 604 604 >>> Variable('article').resolve(c) 605 {'section': 'News'}605 {'section': u'News'} 606 606 >>> class AClass: pass 607 607 >>> c = AClass() 608 608 >>> c.article = AClass() 609 >>> c.article.section = 'News'609 >>> c.article.section = u'News' 610 610 >>> Variable('article.section').resolve(c) 611 611 u'News' 612 612