django-native-tags

Pythonic Templatetags for Django
Download

django-native-tags Ranking & Summary

Advertisement

  • Rating:
  • License:
  • BSD License
  • Price:
  • FREE
  • Publisher Name:
  • Justin Quick
  • Publisher web site:
  • http://code.google.com/u/justquick/

django-native-tags Tags


django-native-tags Description

Pythonic Templatetags for Django django-native-tags offers a way of making the creation of template tags stupidly simple. Tags are "native" because there is a much closer relationship between the tag in the template and a Python function behind the scenes. The app abstracts the work needed to parse out the templatetag syntax into a useable form for a Python function. For example: Define an arbitrary function in your templatetags: def add(x, y): return x + yadd.function = TrueUse the function in your template:{% add 1000 100 as num %}{{ num|intcomma }} Which outputs: 1,100 Other features of Native Tags: Keyword argument parsingQuoted strings parsed corectlyNo {% load %} tags requiredAuto resolve of template variables The real power of the module comes in the Contrib Add Ons which has tons of tags right out of the box, ready to use. Proper use of the Contrib Add Ons makes this app a functional replacement to James Bennett's django-template-utils Requirements: · Django · Python


django-native-tags Related Software