mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Ensure that pgAdmin4 should work with latest jinja2 version. Fixes #7269
This commit is contained in:
committed by
Akshay Joshi
parent
0b4a874f30
commit
04d0ab4adf
@@ -26,3 +26,4 @@ Bug fixes
|
|||||||
| `Issue #7257 <https://redmine.postgresql.org/issues/7257>`_ - Support running the container under OpenShift with alternate UIDs.
|
| `Issue #7257 <https://redmine.postgresql.org/issues/7257>`_ - Support running the container under OpenShift with alternate UIDs.
|
||||||
| `Issue #7261 <https://redmine.postgresql.org/issues/7261>`_ - Correct typo in the documentation.
|
| `Issue #7261 <https://redmine.postgresql.org/issues/7261>`_ - Correct typo in the documentation.
|
||||||
| `Issue #7267 <https://redmine.postgresql.org/issues/7267>`_ - Fixed an issue where unexpected error messages are displayed when users change the language via preferences.
|
| `Issue #7267 <https://redmine.postgresql.org/issues/7267>`_ - Fixed an issue where unexpected error messages are displayed when users change the language via preferences.
|
||||||
|
| `Issue #7269 <https://redmine.postgresql.org/issues/7269>`_ - Ensure that pgAdmin4 should work with latest jinja2 version.
|
||||||
|
@@ -33,6 +33,7 @@ from flask_security.utils import login_user, logout_user
|
|||||||
from werkzeug.datastructures import ImmutableDict
|
from werkzeug.datastructures import ImmutableDict
|
||||||
from werkzeug.local import LocalProxy
|
from werkzeug.local import LocalProxy
|
||||||
from werkzeug.utils import find_modules
|
from werkzeug.utils import find_modules
|
||||||
|
from jinja2 import select_autoescape
|
||||||
|
|
||||||
from pgadmin.model import db, Role, Server, SharedServer, ServerGroup, \
|
from pgadmin.model import db, Role, Server, SharedServer, ServerGroup, \
|
||||||
User, Keys, Version, SCHEMA_VERSION as CURRENT_SCHEMA_VERSION
|
User, Keys, Version, SCHEMA_VERSION as CURRENT_SCHEMA_VERSION
|
||||||
@@ -70,7 +71,7 @@ class PgAdmin(Flask):
|
|||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
# Set the template loader to a postgres-version-aware loader
|
# Set the template loader to a postgres-version-aware loader
|
||||||
self.jinja_options = ImmutableDict(
|
self.jinja_options = ImmutableDict(
|
||||||
extensions=['jinja2.ext.autoescape', 'jinja2.ext.with_'],
|
autoescape=select_autoescape(enabled_extensions=('html', 'xml')),
|
||||||
loader=VersionedTemplateLoader(self)
|
loader=VersionedTemplateLoader(self)
|
||||||
)
|
)
|
||||||
self.logout_hooks = []
|
self.logout_hooks = []
|
||||||
|
Reference in New Issue
Block a user