Module template
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
source linkRe-exported Classes
-
A stack container for variable context
[django.template.context.Context]
-
pop() has been called more times than push()
[django.template.context.ContextPopException]
-
[django.template.engine.Engine]
-
[django.template.utils.EngineHandler]
-
A class for registering template tags and filters. Compiled filter and
[django.template.library.Library]
-
[django.template.base.Node]
-
[django.template.base.NodeList]
-
[django.template.base.Origin]
-
This subclass of template.Context automatically populates itself using
[django.template.context.RequestContext]
-
[django.template.base.Template]
-
The exception used when a template does not exist. Optional arguments:
[django.template.exceptions.TemplateDoesNotExist]
-
The exception used for syntax errors during parsing or rendering.
[django.template.exceptions.TemplateSyntaxError]
-
A template variable, resolvable against a given context. The variable may be a hard-coded string (if it begins and ends with single or double quote marks)::
[django.template.base.Variable]
-
[django.template.base.VariableDoesNotExist]
Submodules
This is the Django template system.
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.
Default variable filters.
Default tags used by the template system, available to all templates.
This module contains generic exceptions used by template backends. Although,
Parser and utilities for the smart 'if' tag