On Tue, Jul 11, 2017 at 12:09 PM, Devrim Gündüz <dev...@gunduz.org> wrote:
> > Hi, > > Sorry, I missed this part: > > On Tue, 2017-07-11 at 11:44 +0100, Dave Page wrote: > > It was fixed in the code: > > > > # HTMLMIN doesn't work with Python 2.6. > > if not config.DEBUG and sys.version_info >= (2,7): > > HTMLMIN(app) > > > > Though, we do have an unconditional import (both in > > web/pgadmin/__init__.py). > > > > Does the app run? > > We even cannot build it. > > I just tried it on CentOS 6 here, and the app runs, but the docs don't build. That's weird, considering https://jenkins.pgadmin.org/job/pgadmin4-master-python26/lastSuccessfulBuild/ . Anyway; the attached patch fixes the issue for me. I wonder if this is some CentOS weirdness... -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company
diff --git a/web/pgadmin/__init__.py b/web/pgadmin/__init__.py index 4389e96b..55c59732 100644 --- a/web/pgadmin/__init__.py +++ b/web/pgadmin/__init__.py @@ -16,7 +16,6 @@ from importlib import import_module from flask import Flask, abort, request, current_app, session from flask_babel import Babel, gettext -from flask_htmlmin import HTMLMIN from flask_login import user_logged_in from flask_security import Security, SQLAlchemyUserDatastore from flask_mail import Mail @@ -146,6 +145,9 @@ def create_app(app_name=None): if not app_name: app_name = config.APP_NAME + if not config.DEBUG and sys.version_info >= (2,7): + from flask_htmlmin import HTMLMIN + """Create the Flask application, startup logging and dynamically load additional modules (blueprints) that are found in this directory.""" app = PgAdmin(__name__, static_url_path='/static')