You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

__init__.py 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. """
  2. Django's support for templates.
  3. The django.template namespace contains two independent subsystems:
  4. 1. Multiple Template Engines: support for pluggable template backends,
  5. built-in backends and backend-independent APIs
  6. 2. Django Template Language: Django's own template engine, including its
  7. built-in loaders, context processors, tags and filters.
  8. Ideally these subsystems would be implemented in distinct packages. However
  9. keeping them together made the implementation of Multiple Template Engines
  10. less disruptive .
  11. Here's a breakdown of which modules belong to which subsystem.
  12. Multiple Template Engines:
  13. - django.template.backends.*
  14. - django.template.loader
  15. - django.template.response
  16. Django Template Language:
  17. - django.template.base
  18. - django.template.context
  19. - django.template.context_processors
  20. - django.template.loaders.*
  21. - django.template.debug
  22. - django.template.defaultfilters
  23. - django.template.defaulttags
  24. - django.template.engine
  25. - django.template.loader_tags
  26. - django.template.smartif
  27. Shared:
  28. - django.template.utils
  29. """
  30. # Multiple Template Engines
  31. from .engine import Engine
  32. from .utils import EngineHandler
  33. engines = EngineHandler()
  34. __all__ = ('Engine', 'engines')
  35. # Django Template Language
  36. # Public exceptions
  37. from .base import VariableDoesNotExist # NOQA isort:skip
  38. from .context import ContextPopException # NOQA isort:skip
  39. from .exceptions import TemplateDoesNotExist, TemplateSyntaxError # NOQA isort:skip
  40. # Template parts
  41. from .base import ( # NOQA isort:skip
  42. Context, Node, NodeList, Origin, RequestContext, Template, Variable,
  43. )
  44. # Library management
  45. from .library import Library # NOQA isort:skip
  46. __all__ += ('Template', 'Context', 'RequestContext')