skip to navigation
skip to content

Not Logged In

django-templatetag-sugar 0.1

A library to make Django's template tags sweet.

Latest Version: 1.0

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 ""
    else:
        return val

As you can see it makes it super simple to define the syntax for a tag.

 
File Type Py Version Uploaded on Size
django-templatetag-sugar-0.1.tar.gz (md5) Source 2010-05-24 2KB
  • Downloads (All Versions):
  • 281 downloads in the last day
  • 1549 downloads in the last week
  • 7256 downloads in the last month