django-template-analyzer 1.1.0

Extract template nodes from a Django template
django-template-analyzer is a Django app that offers an API to analyze the Django template structure. It can be used to find nodes of a particular type, e.g. to do automatic detection of placeholder tags.

API example

from template_analyzer.djangoanalyzer import get_node_instances
from mycms.templatetags.placeholdertags import Placeholder

template = get_template("mycms/default-page.html")

placeholders = get_node_instances(template, Placeholder)
placeholder_names = [p.get_name() for p in placeholders]


Installation

First install the module, preferably in a virtual environment. It can be installed from PyPI:

pip install django-template-analyzer

Or the current folder can be installed:

pip install .

last updated on:
May 7th, 2012, 2:49 GMT
price:
FREE!
developed by:
Diederik van der Boor and Django CMS d...
homepage:
github.com
license type:
BSD License 
category:
ROOT \ Internet \ HTTP (WWW)
django-template-analyzer
Download Button

In a hurry? Add it to your Download Basket!

user rating

UNRATED
0.0/5
 

0/5

Rate it!
What's New in This Release:
  • Added Django 1.4 compatibility.
read full changelog

Add your review!

SUBMIT