diff options
author | shadchin <shadchin@yandex-team.com> | 2024-07-22 10:46:36 +0300 |
---|---|---|
committer | shadchin <shadchin@yandex-team.com> | 2024-07-22 10:57:10 +0300 |
commit | b28ebe1bef50f23bcb3bffac9964e77f13a0058d (patch) | |
tree | b3ae6dcf6b966809df80dc5d9743fc87ed855314 /contrib/python/Flask | |
parent | 7a8bf49265109474e1529e1f9fb790e684a0771d (diff) | |
download | ydb-b28ebe1bef50f23bcb3bffac9964e77f13a0058d.tar.gz |
Fix templates (version 2)
47274c98d3db8b857bdc3dc05fbd2beacde038ba
Diffstat (limited to 'contrib/python/Flask')
-rw-r--r-- | contrib/python/Flask/py3/flask/scaffold.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/python/Flask/py3/flask/scaffold.py b/contrib/python/Flask/py3/flask/scaffold.py index a58941c01d..8f301d9001 100644 --- a/contrib/python/Flask/py3/flask/scaffold.py +++ b/contrib/python/Flask/py3/flask/scaffold.py @@ -10,7 +10,7 @@ from functools import update_wrapper from json import JSONDecoder from json import JSONEncoder -from jinja2 import ChoiceLoader, FileSystemLoader, ResourceLoader +from jinja2 import ChoiceLoader, FileSystemLoader, ResourceLoader, PackageLoader from werkzeug.exceptions import default_exceptions from werkzeug.exceptions import HTTPException @@ -359,6 +359,7 @@ class Scaffold: if self.template_folder is not None: return ChoiceLoader([ FileSystemLoader(os.path.join(self.root_path, self.template_folder)), + PackageLoader(self.import_name, self.template_folder, skip_unknown_package=True), ResourceLoader(os.path.join(self._builtin_resource_prefix, self.template_folder), self.module_loader), ]) else: |