def load_template(self, template_name, template_dirs=None): app_directories_loader = AppDirectoriesLoader() for skip_path in getattr(settings, 'KEEP_DJANGO_TEMPLATES', []): # Hackish way to use Django Loader for Django Admin if skip_path in template_name: return app_directories_loader(template_name, template_dirs) if not template_name.endswith(DEFAULT_JINJA2_TEMPLATE_EXTENSION): return super(LoaderMixin, self).load_template(template_name, template_dirs) try: template = env.get_template(template_name) return template, template.filename except jinja2.TemplateNotFound: raise TemplateDoesNotExist(template_name)
def __init__(self): MakoLoader.__init__(self, AppDirectoriesLoader())
def __init__(self, *args): MakoLoader.__init__(self, AppDirectoriesLoader(*args))
def __init__(self, *args): MakoLoader.__init__(self, AppDirectoriesLoader(*args)) # lint-amnesty, pylint: disable=no-value-for-parameter