class Library:
Method | __init__ |
Undocumented |
Method | filter |
Register a callable as a template filter. Example: |
Method | filter_function |
Undocumented |
Method | inclusion_tag |
Register a callable as an inclusion tag: |
Method | simple_tag |
Register a callable as a compiled template tag. Example: |
Method | tag |
Undocumented |
Method | tag_function |
Undocumented |
Instance Variable | filters |
Undocumented |
Instance Variable | tags |
Undocumented |
Register a callable as a template filter. Example:
@register.filter def lower(value):
return value.lower()
Register a callable as an inclusion tag:
@register.inclusion_tag('results.html') def show_results(poll):
choices = poll.choice_set.all() return {'choices': choices}