Django

Code

Ticket #7293: 7293.patch

File 7293.patch, 1.0 kB (added by akaihola, 6 months ago)

fix for the docstrings in django/template/init.py

  • django/template/__init__.py

    old new  
    467467        >>> len(fe.filters) 
    468468        2 
    469469        >>> fe.var 
    470         'variable' 
     470        <Variable: 'variable'> 
    471471 
    472472    This class should never be instantiated outside of the 
    473473    get_filters_from_token helper function. 
     
    598598    a hard-coded string (if it begins and ends with single or double quote 
    599599    marks):: 
    600600 
    601         >>> c = {'article': {'section':'News'}} 
     601        >>> c = {'article': {'section':u'News'}} 
    602602        >>> Variable('article.section').resolve(c) 
    603603        u'News' 
    604604        >>> Variable('article').resolve(c) 
    605         {'section': 'News'} 
     605        {'section': u'News'} 
    606606        >>> class AClass: pass 
    607607        >>> c = AClass() 
    608608        >>> c.article = AClass() 
    609         >>> c.article.section = 'News' 
     609        >>> c.article.section = u'News' 
    610610        >>> Variable('article.section').resolve(c) 
    611611        u'News' 
    612612