Previous Page Next Page

Q&A

Q.Is there a way to use the template system in a stand-alone mode?
A.Yes, but you must import the pieces you need from the template system and call the django.conf.settings.configure() function to configure the system manually. You can find more information about this process in the documentation at www.djangoproject.com.
Q.Are there other tag and filter libraries bundled in Django?
A.Yes. Django also bundles the following libraries in django.contrib. These libraries can be activated by adding them to the INSTALLED_APPS setting in the settings.py file.
  • The django.contrib.humanize library contains a set of filters that help in adding a human touch to your templates. For example, the natural-day filter in the humanize library will render a date object in the textual form of yesterday, today, or tomorrow if applicable.

  • The django.contrib.markup library contains a collection of filters that implement common markdown languages. For example, the textile filter will implement Textile, markdown will implement the Markdown language, and restructuredtext will implement the ReST language.

  • The django.contrib.webdesign libraries contain template tags that can be useful while designing a website. Currently, the only tag is the lorem tag which will display random "lorem ipsum" Latin text.

Previous Page Next Page