Opened 13 years ago
Closed 13 years ago
#4522 closed task (fixed)
Write a Django Templating Language module for DojoX
Reported by: | Neil Roberts | Owned by: | Neil Roberts |
---|---|---|---|
Priority: | high | Milestone: | 1.0 |
Component: | Dojox | Version: | 0.9 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Project description
The Django Templating language uses a system of templates that can be compiled once and rendered indefinitely afterwards. It uses a simple system of tags and filters.
This aims to be a 1:1 match with the Django Templating Language as outlined in http://www.djangoproject.com/documentation/templates/. Many common tags and filters have been implemented (see below), along with new filters and tags as necessary (see below).
The Django Templating Language is intended within Django to only handle text. Our implementation is able to handle HTML in addition to text. Actually, the text and HTML portions of dojox.dtl are two separate layers, the HTML layer sits on top of the text layer (base). It's also been implemented in such a way that you have little to fear when moving your code from Django to dojox.dtl. Your existing templates should work, and will benefit from the massive performance gain of being able to manipulate nodes, rather than having to do clunky innerHTML swaps you would have to do with a text-only system. It also allows for new HTML-centric abilities, outlined below.
Despite having two levels of complexity, if you write your tags correctly, they will work in both environments.
(In [10570]) Fixes #4522
Implements the full Django Templating Language architecture, with an additional Template object for HTML, as well as tags and filters outlined in the README.