mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Ensure HTMLMIN is only used with Python 2.7+
This commit is contained in:
committed by
Dave Page
parent
f2929046fa
commit
91406d2879
@@ -16,7 +16,6 @@ from importlib import import_module
|
||||
|
||||
from flask import Flask, abort, request, current_app, session, url_for
|
||||
from flask_babel import Babel, gettext
|
||||
from flask_htmlmin import HTMLMIN
|
||||
from flask_login import user_logged_in, user_logged_out
|
||||
from flask_security import Security, SQLAlchemyUserDatastore
|
||||
from flask_mail import Mail
|
||||
@@ -553,6 +552,7 @@ def create_app(app_name=None):
|
||||
##########################################################################
|
||||
# HTMLMIN doesn't work with Python 2.6.
|
||||
if not config.DEBUG and sys.version_info >= (2,7):
|
||||
from flask_htmlmin import HTMLMIN
|
||||
HTMLMIN(app)
|
||||
|
||||
@app.context_processor
|
||||
|
||||
Reference in New Issue
Block a user