Jump to >


class Loader(*args, **kwargs)[source]

Bases: django.template.loaders.app_directories.Loader

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’.

__init__(*args, **kwargs)[source]
get_template_sources(template_name, template_dirs=None)[source]