superset/panoramix/config.py

148 lines
4.6 KiB
Python
Raw Normal View History

2015-07-15 13:12:32 -04:00
import os
2015-09-09 13:37:59 -04:00
from flask_appbuilder.security.manager import AUTH_DB
# from flask_appbuilder.security.manager import (
# AUTH_OID, AUTH_REMOTE_USER, AUTH_DB, AUTH_LDAP, AUTH_OAUTH)
2015-09-25 18:43:50 -04:00
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
from dateutil import tz
2015-07-15 13:12:32 -04:00
2015-07-21 14:56:05 -04:00
"""
All configuration in this file can be overridden by providing a local_config
in your PYTHONPATH.
There' a ``from local_config import *`` at the end of this file.
"""
2015-09-09 13:37:59 -04:00
# ---------------------------------------------------------
2015-07-15 13:12:32 -04:00
# Panoramix specifix config
2015-09-09 13:37:59 -04:00
# ---------------------------------------------------------
2015-09-09 16:54:21 -04:00
ROW_LIMIT = 50000
WEBSERVER_THREADS = 8
2015-07-15 13:12:32 -04:00
2015-07-24 02:28:53 -04:00
PANORAMIX_WEBSERVER_PORT = 8088
2015-10-13 19:06:37 -04:00
PANORAMIX_WEBSERVER_TIMEOUT = 60
2015-09-11 18:32:42 -04:00
CUSTOM_SECURITY_MANAGER = None
2015-09-09 13:37:59 -04:00
# ---------------------------------------------------------
2015-07-15 13:12:32 -04:00
# Your App secret key
SECRET_KEY = '\2\1thisismyscretkey\1\2\e\y\y\h'
# The SQLAlchemy connection string.
2015-09-19 05:21:49 -04:00
SQLALCHEMY_DATABASE_URI = 'sqlite:////tmp/panoramix.db'
2015-09-09 13:37:59 -04:00
# SQLALCHEMY_DATABASE_URI = 'mysql://myapp@localhost/myapp'
# SQLALCHEMY_DATABASE_URI = 'postgresql://root:password@localhost/myapp'
2015-07-15 13:12:32 -04:00
# Flask-WTF flag for CSRF
CSRF_ENABLED = True
2015-09-09 13:37:59 -04:00
# Whether to run the web server in debug mode or not
2015-07-27 18:51:36 -04:00
DEBUG = True
# Whether to show the stacktrace on 500 error
SHOW_STACKTRACE = True
2015-09-09 13:37:59 -04:00
# ------------------------------
2015-07-15 13:12:32 -04:00
# GLOBALS FOR APP Builder
2015-09-09 13:37:59 -04:00
# ------------------------------
2015-07-15 13:12:32 -04:00
# Uncomment to setup Your App name
APP_NAME = "Panoramix"
# Uncomment to setup Setup an App icon
2015-10-01 02:21:09 -04:00
APP_ICON = "/static/img/chaudron_white.png"
2015-07-15 13:12:32 -04:00
# Druid query timezone
# tz.tzutc() : Using utc timezone
# tz.tzlocal() : Using local timezone
# other tz can be overridden by providing a local_config
DRUID_TZ = tz.tzutc()
2015-09-09 13:37:59 -04:00
# ----------------------------------------------------
2015-07-15 13:12:32 -04:00
# AUTHENTICATION CONFIG
2015-09-09 13:37:59 -04:00
# ----------------------------------------------------
2015-07-15 13:12:32 -04:00
# The authentication type
# AUTH_OID : Is for OpenID
# AUTH_DB : Is for database (username/password()
# AUTH_LDAP : Is for LDAP
# AUTH_REMOTE_USER : Is for using REMOTE_USER from web server
AUTH_TYPE = AUTH_DB
# Uncomment to setup Full admin role name
2015-09-09 13:37:59 -04:00
# AUTH_ROLE_ADMIN = 'Admin'
2015-07-15 13:12:32 -04:00
# Uncomment to setup Public role name, no authentication needed
2015-09-09 13:37:59 -04:00
# AUTH_ROLE_PUBLIC = 'Public'
2015-07-15 13:12:32 -04:00
# Will allow user self registration
2015-09-09 13:37:59 -04:00
# AUTH_USER_REGISTRATION = True
2015-07-15 13:12:32 -04:00
# The default user self registration role
2015-09-09 13:37:59 -04:00
# AUTH_USER_REGISTRATION_ROLE = "Public"
2015-07-15 13:12:32 -04:00
# When using LDAP Auth, setup the ldap server
2015-09-09 13:37:59 -04:00
# AUTH_LDAP_SERVER = "ldap://ldapserver.new"
2015-07-15 13:12:32 -04:00
# Uncomment to setup OpenID providers example for OpenID authentication
2015-09-09 13:37:59 -04:00
# OPENID_PROVIDERS = [
2015-07-15 13:12:32 -04:00
# { 'name': 'Yahoo', 'url': 'https://me.yahoo.com' },
# { 'name': 'AOL', 'url': 'http://openid.aol.com/<username>' },
# { 'name': 'Flickr', 'url': 'http://www.flickr.com/<username>' },
# { 'name': 'MyOpenID', 'url': 'https://www.myopenid.com' }]
2015-09-09 13:37:59 -04:00
# ---------------------------------------------------
2015-07-15 13:12:32 -04:00
# Babel config for translations
2015-09-09 13:37:59 -04:00
# ---------------------------------------------------
2015-07-15 13:12:32 -04:00
# Setup default language
BABEL_DEFAULT_LOCALE = 'en'
# Your application default translation path
BABEL_DEFAULT_FOLDER = 'translations'
# The allowed translation for you app
LANGUAGES = {
2015-09-09 13:37:59 -04:00
'en': {'flag': 'us', 'name': 'English'},
'fr': {'flag': 'fr', 'name': 'French'},
2015-07-15 13:12:32 -04:00
}
2015-07-16 20:55:36 -04:00
"""
'pt': {'flag':'pt', 'name':'Portuguese'},
'pt_BR': {'flag':'br', 'name': 'Pt Brazil'},
'es': {'flag':'es', 'name':'Spanish'},
'de': {'flag':'de', 'name':'German'},
'zh': {'flag':'cn', 'name':'Chinese'},
'ru': {'flag':'ru', 'name':'Russian'}
"""
2015-09-09 13:37:59 -04:00
# ---------------------------------------------------
2015-07-15 13:12:32 -04:00
# Image and file configuration
2015-09-09 13:37:59 -04:00
# ---------------------------------------------------
2015-07-15 13:12:32 -04:00
# The file upload folder, when using models with files
2015-09-25 18:43:50 -04:00
UPLOAD_FOLDER = BASE_DIR + '/app/static/uploads/'
2015-07-15 13:12:32 -04:00
# The image upload folder, when using models with images
2015-09-25 18:43:50 -04:00
IMG_UPLOAD_FOLDER = BASE_DIR + '/app/static/uploads/'
2015-07-15 13:12:32 -04:00
# The image upload url, when using models with images
IMG_UPLOAD_URL = '/static/uploads/'
# Setup image size default is (300, 200, True)
2015-09-09 13:37:59 -04:00
# IMG_SIZE = (300, 200, True)
2015-07-15 13:12:32 -04:00
2015-09-09 13:37:59 -04:00
# ---------------------------------------------------
2015-07-15 13:12:32 -04:00
# Theme configuration
# these are located on static/appbuilder/css/themes
2015-09-09 13:37:59 -04:00
# you can create your own and easily use them placing them on the
# same dir structure to override
# ---------------------------------------------------
# APP_THEME = "bootstrap-theme.css" # default bootstrap
# APP_THEME = "cerulean.css"
# APP_THEME = "amelia.css"
# APP_THEME = "cosmo.css"
# APP_THEME = "cyborg.css"
# APP_THEME = "flatly.css"
# APP_THEME = "journal.css"
# APP_THEME = "readable.css"
# APP_THEME = "simplex.css"
# APP_THEME = "slate.css"
# APP_THEME = "spacelab.css"
# APP_THEME = "united.css"
# APP_THEME = "yeti.css"
2015-07-15 13:12:32 -04:00
2015-07-21 14:56:05 -04:00
try:
2015-09-05 12:23:46 -04:00
from panoramix_config import *
2015-07-21 14:56:05 -04:00
except:
pass