mistercrunch closed pull request #4543: Setting up compression using 
flask-compress
URL: https://github.com/apache/incubator-superset/pull/4543
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/setup.py b/setup.py
index 682fe336d8..ad33dcec58 100644
--- a/setup.py
+++ b/setup.py
@@ -59,6 +59,7 @@ def get_git_sha():
         'flask-cache==0.13.1',
         'flask-migrate==2.1.1',
         'flask-script==2.0.6',
+        'flask-compress==1.4.0',
         'flask-sqlalchemy==2.1',
         'flask-testing==0.7.1',
         'flask-wtf==0.14.2',
diff --git a/superset/__init__.py b/superset/__init__.py
index 778bb61616..fbf11c0780 100644
--- a/superset/__init__.py
+++ b/superset/__init__.py
@@ -13,6 +13,7 @@
 from flask import Flask, redirect
 from flask_appbuilder import AppBuilder, IndexView, SQLA
 from flask_appbuilder.baseviews import expose
+from flask_compress import Compress
 from flask_migrate import Migrate
 from flask_wtf.csrf import CSRFProtect
 from werkzeug.contrib.fixers import ProxyFix
@@ -166,6 +167,9 @@ def index(self):
 module_datasource_map.update(app.config.get('ADDITIONAL_MODULE_DS_MAP'))
 ConnectorRegistry.register_sources(module_datasource_map)
 
+# Flask-Compress
+Compress(app)
+
 # Hook that provides administrators a handle on the Flask APP
 # after initialization
 flask_app_mutator = app.config.get('FLASK_APP_MUTATOR')


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to