From 11401cdc82a638fdd0dbdf0feda492d6680fa51a Mon Sep 17 00:00:00 2001 From: Devin Matte Date: Sun, 11 Aug 2019 21:59:15 -0400 Subject: [PATCH] Gzip and compressing --- packet/__init__.py | 2 ++ packet/templates/extend/base.html | 1 - packet/templates/extend/email.html | 1 - packet/templates/include/head.html | 1 - requirements.txt | 1 + 5 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packet/__init__.py b/packet/__init__.py index 4e55681a..f68c9184 100644 --- a/packet/__init__.py +++ b/packet/__init__.py @@ -8,12 +8,14 @@ import csh_ldap from flask import Flask +from flask_gzip import Gzip from flask_migrate import Migrate from flask_pyoidc.flask_pyoidc import OIDCAuthentication from flask_pyoidc.provider_configuration import ProviderConfiguration, ClientMetadata from flask_sqlalchemy import SQLAlchemy app = Flask(__name__) +gzip = Gzip(app) # Load default configuration and any environment variable overrides _root_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) diff --git a/packet/templates/extend/base.html b/packet/templates/extend/base.html index 0ffb763e..b2410b6e 100644 --- a/packet/templates/extend/base.html +++ b/packet/templates/extend/base.html @@ -19,7 +19,6 @@ {% endblock %} {% block includes %} - {% endblock %} {% block scripts %} diff --git a/packet/templates/extend/email.html b/packet/templates/extend/email.html index d9bc5b41..20fb7de7 100644 --- a/packet/templates/extend/email.html +++ b/packet/templates/extend/email.html @@ -13,6 +13,5 @@ {% block body %} {% endblock %} - diff --git a/packet/templates/include/head.html b/packet/templates/include/head.html index ab13f959..677e611f 100644 --- a/packet/templates/include/head.html +++ b/packet/templates/include/head.html @@ -1,5 +1,4 @@ - diff --git a/requirements.txt b/requirements.txt index a8e325fd..782ac6e1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,7 @@ Flask~=1.1.0 Flask-pyoidc~=2.2.0 Flask-Mail~=0.9.1 +Flask-Gzip~=0.2 flask_sqlalchemy~=2.3.2 psycopg2-binary~=2.8.3 Flask-Migrate~=2.2.1