OLD | NEW |
1 # -*- coding: utf-8 -*- | 1 # -*- coding: utf-8 -*- |
2 """ | 2 """ |
3 jinja2.loaders | 3 jinja2.loaders |
4 ~~~~~~~~~~~~~~ | 4 ~~~~~~~~~~~~~~ |
5 | 5 |
6 Jinja loader classes. | 6 Jinja loader classes. |
7 | 7 |
8 :copyright: (c) 2010 by the Jinja Team. | 8 :copyright: (c) 2010 by the Jinja Team. |
9 :license: BSD, see LICENSE for more details. | 9 :license: BSD, see LICENSE for more details. |
10 """ | 10 """ |
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 mod = __import__(module, None, None, ['root']) | 462 mod = __import__(module, None, None, ['root']) |
463 except ImportError: | 463 except ImportError: |
464 raise TemplateNotFound(name) | 464 raise TemplateNotFound(name) |
465 | 465 |
466 # remove the entry from sys.modules, we only want the attribute | 466 # remove the entry from sys.modules, we only want the attribute |
467 # on the module object we have stored on the loader. | 467 # on the module object we have stored on the loader. |
468 sys.modules.pop(module, None) | 468 sys.modules.pop(module, None) |
469 | 469 |
470 return environment.template_class.from_module_dict( | 470 return environment.template_class.from_module_dict( |
471 environment, mod.__dict__, globals) | 471 environment, mod.__dict__, globals) |
OLD | NEW |