django-template-analyzer 1.0.0
Django Template Analyzer - Extract template nodes from a Django template
Latest Version: 1.1.0
Introduction
The template_analyzer package 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 .
Credits
- This package is based on the work of Django CMS.
- Many thanks to the contributors of cms/utils/plugins.py in Django CMS!
| File | Type | Py Version | Uploaded on | Size | # downloads |
|---|---|---|---|---|---|
| django-template-analyzer-1.0.0.tar.gz (md5) | Source | 2011-12-20 | 5KB | 217 | |
- Author: Diederik van der Boor & Django CMS developers
- Home Page: https://github.com/edoburu/django-template-analyzer
- Download URL: https://github.com/edoburu/django-template-analyzer/zipball/master
- License: BSD License
- Platform: OS Independent
-
Categories
- Development Status :: 5 - Production/Stable
- Environment :: Web Environment
- Framework :: Django
- Intended Audience :: Developers
- License :: OSI Approved :: BSD License
- Operating System :: OS Independent
- Programming Language :: Python
- Topic :: Software Development
- Topic :: Software Development :: Libraries :: Application Frameworks
- Package Index Owner: vdboor
- DOAP record: django-template-analyzer-1.0.0.xml
