Skip to content

Commit

Permalink
Merge pull request #36 from lyft/mergeLatest
Browse files Browse the repository at this point in the history
Merge latest from apache:lyft-develop
  • Loading branch information
Beto Dealmeida authored May 20, 2019
2 parents 6e89453 + 20b409e commit f1c82f7
Show file tree
Hide file tree
Showing 30 changed files with 389 additions and 231 deletions.
20 changes: 18 additions & 2 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -858,13 +858,19 @@ To allow scheduled queries, add the following to your `config.py`:
},
'start_date': {
'type': 'string',
'format': 'date-time',
'title': 'Start date',
# date-time is parsed using the chrono library, see
# https://www.npmjs.com/package/chrono-node#usage
'format': 'date-time',
'default': 'tomorrow at 9am',
},
'end_date': {
'type': 'string',
'format': 'date-time',
'title': 'End date',
# date-time is parsed using the chrono library, see
# https://www.npmjs.com/package/chrono-node#usage
'format': 'date-time',
'default': '9am in 30 days',
},
'schedule_interval': {
'type': 'string',
Expand All @@ -890,6 +896,16 @@ To allow scheduled queries, add the following to your `config.py`:
),
},
},
'VALIDATION': [
# ensure that start_date <= end_date
{
'name': 'less_equal',
'arguments': ['start_date', 'end_date'],
'message': 'End date cannot be before start date',
# this is where the error message is shown
'container': 'end_date',
},
]
},
}
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#
# pip-compile --output-file requirements.txt setup.py
#

alembic==1.0.0 # via flask-migrate
amqp==2.3.2 # via kombu
apispec[yaml]==1.2.0 # via flask-appbuilder
Expand Down Expand Up @@ -33,6 +34,7 @@ flask-migrate==2.1.1
flask-oauthlib==0.9.5
flask-openid==1.2.5 # via flask-appbuilder
flask-sqlalchemy==2.3.2 # via flask-appbuilder, flask-migrate
flask-talisman==0.6.0
flask-wtf==0.14.2
flask==1.0.2
geopy==1.11.0
Expand Down Expand Up @@ -71,7 +73,6 @@ requests==2.20.0
retry==0.9.2
selenium==3.141.0
simplejson==3.15.0
six==1.11.0 # via bleach, cryptography, flask-jwt-extended, isodate, jsonschema, pathlib2, polyline, prison, pydruid, pyrsistent, python-dateutil, sqlalchemy-utils, wtforms-json
sqlalchemy-utils==0.32.21
sqlalchemy==1.3.1
sqlparse==0.2.4
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ def get_git_sha():
'flask-appbuilder>=2.0.0, <2.3.0',
'flask-caching',
'flask-compress',
'flask-talisman',
'flask-migrate',
'flask-wtf',
'geopy',
Expand Down
3 changes: 3 additions & 0 deletions superset/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
from flask_appbuilder.baseviews import expose
from flask_compress import Compress
from flask_migrate import Migrate
from flask_talisman import Talisman
from flask_wtf.csrf import CSRFProtect
from werkzeug.contrib.fixers import ProxyFix
import wtforms_json
Expand Down Expand Up @@ -229,6 +230,8 @@ def is_feature_enabled(feature):
if conf.get('ENABLE_FLASK_COMPRESS'):
Compress(app)

Talisman(app, content_security_policy=None)

# Hook that provides administrators a handle on the Flask APP
# after initialization
flask_app_mutator = app.config.get('FLASK_APP_MUTATOR')
Expand Down
Loading

0 comments on commit f1c82f7

Please sign in to comment.