Skip to content

Commit

Permalink
Setting up compression using flask-compress (apache#4543)
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch authored and 刘红亮 committed Mar 8, 2018
1 parent 45f71dc commit 0e3f401
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
4 changes: 4 additions & 0 deletions superset/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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')
Expand Down

0 comments on commit 0e3f401

Please sign in to comment.