djblets.template.loaders.namespaced_app_dirs¶
- class Loader(*args, **kwargs)[source]¶
Looks for templates in app directories, optionally with a namespace.
This extends the standard Django ‘app_directories’ template loader by allowing a prefix specifying the app whose template should be used. It solves the problem of one app defining a template and another app trying to both override and extend it, resulting in an infinite loop.
Templates can be in the standard form of ‘path/to/template’, or in the namespaced form of ‘app.path:path/to/template’.