Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
18 lines (12 sloc) 459 Bytes
A library to make writing templatetags in Django sweet.
Here's an example of using::
@tag(register, [Constant("for"), Variable(), Optional([Constant("as"), Name()])]):
def example_tag(context, val, asvar=None):
if asvar:
context[asvar] = val
return ""
return val
As you can see it makes it super simple to define the syntax for a tag.
Jump to Line
Something went wrong with that request. Please try again.