Formatting

main
Estelle Poulin 2 years ago
parent d5488a2fda
commit f177a659de

@ -1,14 +1,15 @@
from subjugate.template.engine import GenericEngine
from subjugate.template import SubjugateTemplate
class SubjugateTemplates(GenericEngine):
template_cls = SubjugateTemplate
app_dirname = "subjugate"
def __init__(self, params):
params = params.copy()
self.dirs = list(params.pop('DIRS')) or []
self.app_dirs = bool(params.pop('APP_DIRS'))
options = params.pop('OPTIONS')
self.dirs = list(params.pop("DIRS")) or []
self.app_dirs = bool(params.pop("APP_DIRS"))
options = params.pop("OPTIONS")
super().__init__(self.dirs, self.app_dirs, **options)

@ -1,6 +1,5 @@
from typing import List, Tuple, Union
from django.core.exceptions import ImproperlyConfigured
from django.utils.functional import cached_property
from django.utils.module_loading import import_string
from django.template import Template
from django.template.engine import Engine

@ -38,4 +38,3 @@ class GenericLoader(base.Loader):
def from_string(self, template_code):
return self.template_cls(template_code, self.engine)

Loading…
Cancel
Save