Loading django/template/engine.py +3 −3 Original line number Diff line number Diff line Loading @@ -140,12 +140,12 @@ class Engine(object): pass raise TemplateDoesNotExist(name) def from_string(self, source, origin=None, name=None): def from_string(self, template_code): """ Returns a compiled Template object for the given template code, handling template inheritance recursively. """ return Template(source, origin, name, engine=self) return Template(template_code, engine=self) def get_template(self, template_name, dirs=_dirs_undefined): """ Loading @@ -162,7 +162,7 @@ class Engine(object): template, origin = self.find_template(template_name, dirs) if not hasattr(template, 'render'): # template needs to be compiled template = self.from_string(template, origin, template_name) template = Template(template, origin, template_name, engine=self) return template def render_to_string(self, template_name, dictionary=None, context_instance=None, Loading django/template/loaders/base.py +2 −2 Original line number Diff line number Diff line from django.template.base import TemplateDoesNotExist from django.template.base import Template, TemplateDoesNotExist class Loader(object): Loading @@ -20,7 +20,7 @@ class Loader(object): template_name, template_dirs) try: template = self.engine.from_string(source, origin, template_name) template = Template(source, origin, template_name, self.engine) except TemplateDoesNotExist: # If compiling the template we found raises TemplateDoesNotExist, # back off to returning the source and display name for the Loading django/template/loaders/cached.py +2 −2 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ to load templates from them in order, caching the result. """ import hashlib from django.template.base import TemplateDoesNotExist from django.template.base import Template, TemplateDoesNotExist from django.utils.encoding import force_bytes from .base import Loader as BaseLoader Loading Loading @@ -61,7 +61,7 @@ class Loader(BaseLoader): template, origin = self.find_template(template_name, template_dirs) if not hasattr(template, 'render'): try: template = self.engine.from_string(template, origin, template_name) template = Template(template, origin, template_name, self.engine) except TemplateDoesNotExist: # If compiling the template we found raises TemplateDoesNotExist, # back off to returning the source and display name for the template Loading Loading
django/template/engine.py +3 −3 Original line number Diff line number Diff line Loading @@ -140,12 +140,12 @@ class Engine(object): pass raise TemplateDoesNotExist(name) def from_string(self, source, origin=None, name=None): def from_string(self, template_code): """ Returns a compiled Template object for the given template code, handling template inheritance recursively. """ return Template(source, origin, name, engine=self) return Template(template_code, engine=self) def get_template(self, template_name, dirs=_dirs_undefined): """ Loading @@ -162,7 +162,7 @@ class Engine(object): template, origin = self.find_template(template_name, dirs) if not hasattr(template, 'render'): # template needs to be compiled template = self.from_string(template, origin, template_name) template = Template(template, origin, template_name, engine=self) return template def render_to_string(self, template_name, dictionary=None, context_instance=None, Loading
django/template/loaders/base.py +2 −2 Original line number Diff line number Diff line from django.template.base import TemplateDoesNotExist from django.template.base import Template, TemplateDoesNotExist class Loader(object): Loading @@ -20,7 +20,7 @@ class Loader(object): template_name, template_dirs) try: template = self.engine.from_string(source, origin, template_name) template = Template(source, origin, template_name, self.engine) except TemplateDoesNotExist: # If compiling the template we found raises TemplateDoesNotExist, # back off to returning the source and display name for the Loading
django/template/loaders/cached.py +2 −2 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ to load templates from them in order, caching the result. """ import hashlib from django.template.base import TemplateDoesNotExist from django.template.base import Template, TemplateDoesNotExist from django.utils.encoding import force_bytes from .base import Loader as BaseLoader Loading Loading @@ -61,7 +61,7 @@ class Loader(BaseLoader): template, origin = self.find_template(template_name, template_dirs) if not hasattr(template, 'render'): try: template = self.engine.from_string(template, origin, template_name) template = Template(template, origin, template_name, self.engine) except TemplateDoesNotExist: # If compiling the template we found raises TemplateDoesNotExist, # back off to returning the source and display name for the template Loading