Changeset f24c1e758385d50296d1290f716f409882824269


Ignore:
Timestamp:
02/10/12 20:52:14 (4 months ago)
Author:
Paul Winkler <slinkp@…>
Children:
8dd0fb6a1c035d5d3482b4ea9662f1e8d5724c55
Parents:
8ef6d8b58ae443f7e22d0538602a59ff1ad5f710
git-committer:
Paul Winkler <slinkp@…> (02/10/12 20:52:14)
Message:

docstrings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ebpub/ebpub/db/templatetags/eb.py

    r17bfd5 rf24c1e  
    7373    """ 
    7474    Get singular or plural name of a schema, depending on 'value'. 
    75  
    76     Eg. {% schema_plural_name schema 3 %}  --> Restaurant Inspections 
     75    Example:: 
     76 
     77        {% schema_plural_name schema 3 %}  --> Restaurant Inspections 
    7778        {% schema_plural_name schema 1 %}  --> Restaurant Inspection 
    7879 
     
    8889    ensure sorts always end up the same. 
    8990 
    90     Example: 
    91     {% for item in itemlist|safe_id_sort %} ... {% endfor %} 
     91    Example:: 
     92 
     93      {% for item in itemlist|safe_id_sort %} ... {% endfor %} 
     94 
    9295    """ 
    9396    var_resolve = template.Variable(arg).resolve 
     
    172175    Puts get_metro() into the context as METRO> 
    173176 
    174     Example: {% get_metro %} 
     177    Examples:: 
     178 
     179      {% get_metro %} 
    175180    """ 
    176181    return GetMetroNode() 
     
    193198    """ 
    194199    Puts a newsitem with the given ID in the context with the given 
    195     variable name 
    196  
    197     {% get_newsitem some_id as my_item %} 
    198     {% get_newsitem '23' as my_other_item %} 
     200    variable name. Examples:: 
     201 
     202      {% get_newsitem some_id as my_item %} 
     203      {% get_newsitem '23' as my_other_item %} 
    199204    """ 
    200205    bits = token.split_contents() 
     
    224229    context variable. 
    225230 
    226     Example: 
    227     {% get_more_recent_newsitem [newsitem] [item_list] as [context_var] %} 
     231    Examples:: 
     232 
     233      {% get_more_recent_newsitem [newsitem] [item_list] as [context_var] %} 
    228234    """ 
    229235    bits = token.split_contents() 
     
    260266def do_get_newsitem_list_by_attribute(parser, token): 
    261267    """ 
    262  
     268    Get a list of NewsItems with a given attribute value. 
    263269    Syntax: 
    264270    {% get_newsitem_list_by_attribute [schema_id] [newsitem_id_to_ignore] [att_name]=[value_or_var_containing_value] as [context_var] %} 
    265271 
    266     Example: 
     272    Example:: 
    267273    {% get_newsitem_list_by_attribute schema.id newsitem.id business_id=attributes.business_id as other_licenses %} 
    268274 
     
    314320    optionally grouped by schema. 
    315321 
    316     Examples: 
    317  
    318     {% newsitem_list_by_schema newsitem "ungrouped" %} 
    319     {% newsitem_list_by_schema newsitem_list %} 
     322    Examples:: 
     323 
     324      {% newsitem_list_by_schema newsitem "ungrouped" %} 
     325      {% newsitem_list_by_schema newsitem_list %} 
    320326 
    321327    """ 
Note: See TracChangeset for help on using the changeset viewer.