Skip to content

Commit

Permalink
make CORS an extra dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
itajaja committed May 24, 2016
1 parent d89a8fe commit 155d536
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion caravel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from flask.ext.appbuilder import SQLA, AppBuilder, IndexView
from flask.ext.appbuilder.baseviews import expose
from flask.ext.cache import Cache
from flask.ext.cors import CORS
from flask.ext.migrate import Migrate

from caravel import version
Expand Down Expand Up @@ -48,6 +47,7 @@
logging.getLogger().addHandler(handler)

if app.config.get('ENABLE_CORS'):
from flask.ext.cors import CORS
CORS(app, **app.config.get('CORS_OPTIONS'))


Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
'cryptography>=1.1.1, <2.0.0',
'flask-appbuilder>=1.6.0, <2.0.0',
'Flask-BabelPkg==0.9.6',
'Flask-Cors>=2.0.0',
'flask-cache>=0.13.1, <0.14.0',
'flask-migrate>=1.5.1, <2.0.0',
'flask-script>=2.0.5, <3.0.0',
Expand All @@ -40,6 +39,9 @@
'sqlparse>=0.1.16, <0.2.0',
'werkzeug>=0.11.2, <0.12.0',
],
extras_require={
'cors': ['Flask-Cors>=2.0.0'],
},
tests_require=['coverage'],
author='Maxime Beauchemin',
author_email='[email protected]',
Expand Down

0 comments on commit 155d536

Please sign in to comment.