package documentation

Django's support for templates.

The django.template namespace contains two independent subsystems:

  1. Multiple Template Engines: support for pluggable template backends, built-in backends and backend-independent APIs
  2. Django Template Language: Django's own template engine, including its built-in loaders, context processors, tags and filters.

Ideally these subsystems would be implemented in distinct packages. However keeping them together made the implementation of Multiple Template Engines less disruptive .

Here's a breakdown of which modules belong to which subsystem.

Multiple Template Engines:

  • django.template.backends.*
  • django.template.loader
  • django.template.response

Django Template Language:

  • django.template.base
  • django.template.context
  • django.template.context_processors
  • django.template.loaders.*
  • django.template.debug
  • django.template.defaultfilters
  • django.template.defaulttags
  • django.template.engine
  • django.template.loader_tags
  • django.template.smartif

Shared:

  • django.template.utils
Package backends Undocumented
Module base This is the Django template system.
Module context​_processors A set of request processors that return dictionaries to be merged into a template context. Each function takes the request object as its only parameter and returns a dictionary to add to the context.
Module defaultfilters Default variable filters.
Module loader No module docstring; 3/4 functions documented
Module response Undocumented
Module autoreload Undocumented
Module context No module docstring; 0/1 variable, 1/1 function, 4/6 classes documented
Module defaulttags Default tags used by the template system, available to all templates.
Module engine Undocumented
Module exceptions No summary
Module library No module docstring; 2/2 functions, 2/5 classes documented
Module loader​_tags No module docstring; 0/1 variable, 0/1 constant, 4/4 functions, 0/4 class documented
Package loaders No package docstring; 4/5 modules documented
Module smartif Parser and utilities for the smart 'if' tag
Module utils No module docstring; 1/1 function, 0/2 class documented

From __init__.py:

Class ​Engine No class docstring; 0/2 property, 0/12 instance variable, 0/1 class variable, 4/11 methods, 1/1 static method documented
Variable engines Undocumented
engines =

Undocumented