2019-01-15 18:53:27 -05:00
|
|
|
# Licensed to the Apache Software Foundation (ASF) under one
|
|
|
|
# or more contributor license agreements. See the NOTICE file
|
|
|
|
# distributed with this work for additional information
|
|
|
|
# regarding copyright ownership. The ASF licenses this file
|
|
|
|
# to you under the Apache License, Version 2.0 (the
|
|
|
|
# "License"); you may not use this file except in compliance
|
|
|
|
# with the License. You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing,
|
|
|
|
# software distributed under the License is distributed on an
|
|
|
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
|
|
# KIND, either express or implied. See the License for the
|
|
|
|
# specific language governing permissions and limitations
|
|
|
|
# under the License.
|
2017-11-08 23:34:33 -05:00
|
|
|
# flake8: noqa
|
2019-02-27 18:11:38 -05:00
|
|
|
from copy import copy
|
2016-11-10 02:08:22 -05:00
|
|
|
from superset.config import *
|
2016-03-18 02:44:58 -04:00
|
|
|
|
|
|
|
AUTH_USER_REGISTRATION_ROLE = 'alpha'
|
2016-08-17 00:35:31 -04:00
|
|
|
SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(DATA_DIR, 'unittests.db')
|
2016-03-18 02:44:58 -04:00
|
|
|
DEBUG = True
|
2016-11-10 02:08:22 -05:00
|
|
|
SUPERSET_WEBSERVER_PORT = 8081
|
2016-06-09 21:05:58 -04:00
|
|
|
|
|
|
|
# Allowing SQLALCHEMY_DATABASE_URI to be defined as an env var for
|
|
|
|
# continuous integration
|
2016-11-10 02:08:22 -05:00
|
|
|
if 'SUPERSET__SQLALCHEMY_DATABASE_URI' in os.environ:
|
|
|
|
SQLALCHEMY_DATABASE_URI = os.environ.get('SUPERSET__SQLALCHEMY_DATABASE_URI')
|
2016-08-30 00:55:31 -04:00
|
|
|
|
|
|
|
SQL_SELECT_AS_CTA = True
|
|
|
|
SQL_MAX_ROW = 666
|
2019-02-27 18:11:38 -05:00
|
|
|
FEATURE_FLAGS = {
|
|
|
|
'foo': 'bar',
|
|
|
|
}
|
|
|
|
def GET_FEATURE_FLAGS_FUNC(ff):
|
|
|
|
ff_copy = copy(ff)
|
|
|
|
ff_copy['super'] = 'set'
|
|
|
|
return ff_copy
|
|
|
|
|
2016-08-30 00:55:31 -04:00
|
|
|
|
|
|
|
TESTING = True
|
|
|
|
SECRET_KEY = 'thisismyscretkey'
|
|
|
|
WTF_CSRF_ENABLED = False
|
|
|
|
PUBLIC_ROLE_LIKE_GAMMA = True
|
2016-12-27 17:30:01 -05:00
|
|
|
AUTH_ROLE_PUBLIC = 'Public'
|
2017-01-24 21:11:51 -05:00
|
|
|
EMAIL_NOTIFICATIONS = False
|
2016-08-30 00:55:31 -04:00
|
|
|
|
2018-03-21 16:13:36 -04:00
|
|
|
CACHE_CONFIG = {'CACHE_TYPE': 'simple'}
|
2017-02-08 14:52:58 -05:00
|
|
|
|
2016-08-30 00:55:31 -04:00
|
|
|
class CeleryConfig(object):
|
2017-06-20 16:55:03 -04:00
|
|
|
BROKER_URL = 'redis://localhost'
|
2016-11-10 02:08:22 -05:00
|
|
|
CELERY_IMPORTS = ('superset.sql_lab', )
|
2016-08-30 00:55:31 -04:00
|
|
|
CELERY_ANNOTATIONS = {'sql_lab.add': {'rate_limit': '10/s'}}
|
|
|
|
CONCURRENCY = 1
|
2017-11-10 20:52:34 -05:00
|
|
|
|
|
|
|
|
2016-08-30 00:55:31 -04:00
|
|
|
CELERY_CONFIG = CeleryConfig
|