Skip to content
Myr

Streamlined code. Removed an unnecessary leftover.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

--HG-- branch : trunk

authored by Armin Ronacher · committed by Armin Ronacher · parent 64b08a0 · Browse files · 1 file+2 added−9 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−9 removed

  • other:+2 added−9 removed

1 file+2 added−9 removed

modified:jinja2/loaders.py+2 added-9 removed
383 unmodified lines
384 return sorted(found)385386387class _TemplateModule(ModuleType):388 """Like a normal module but with support for weak references"""389389 def __init__(self, module):390 if isinstance(module, basestring):391 super(_TemplateModule, self).__init__(module)392 else:393 super(_TemplateModule, self).__init__(module.__name__)394 self.__dict__.update(module.__dict__)390396391class ModuleLoader(BaseLoader):392 """This loader loads templates from precompiled templates.393394 Example usage:
41 unmodified lines
436 module = '%s.%s' % (self.package_name, key)437 mod = getattr(self.module, module, None)438 if mod is None:439 try:446 mod = _TemplateModule(__import__(module, None,447 None, ['root']))440 mod = __import__(module, None, None, ['root'])441 except ImportError:442 raise TemplateNotFound(name)443444 # remove the entry from sys.modules, we only want the attribute
5 unmodified lines