vial.config module

This module contains default Vial application configurations.

class vial.config.Config[source]

Bases: object

Base class for default configurations of Vial application. You are free to extend and customize contents of this class to provide better default values for your particular environment.

The configuration keys must be a valid Flask configuration and so they must be written in UPPERCASE to be correctly recognized.

APPLICATION_ID = 'vial'
APPLICATION_NAME = 'Vial'
BABEL_DEFAULT_LOCALE = 'en'
BABEL_DEFAULT_TIMEZONE = 'UTC'
BABEL_DETECT_LOCALE = True

Custom configuration, make detection of best possible locale optional to enable forcing default.

DEBUG = False
DISABLED_ENDPOINTS = []

List of endpoints disabled on application level.

EMAIL_ADMINS = ['root@alchemist.cesnet.cz']

List of system administrator emails.

ENABLED_BLUEPRINTS = ['vial.blueprints.auth', 'vial.blueprints.auth_api', 'vial.blueprints.auth_env', 'vial.blueprints.auth_pwd', 'vial.blueprints.devtools', 'vial.blueprints.design_bs3', 'vial.blueprints.home', 'vial.blueprints.users', 'vial.blueprints.groups', 'vial.blueprints.changelogs']

List of requested application blueprints to be loaded during setup.

ENDPOINT_HOME = 'home.index'

Homepage endpoint.

ENDPOINT_LOGIN = 'auth.login'

Default login view. Users will be redirected to this view in case they are not authenticated, but the authentication is required for the requested endpoint.

ENDPOINT_LOGIN_REDIRECT = 'home.index'

Default redirection endpoint after login.

ENDPOINT_LOGOUT_REDIRECT = 'home.index'

Default redirection endpoint after logout.

LOGIN_MSGCAT = 'info'

Default message category for messages related to user authentication.

LOG_DEFAULT_LEVEL = 'info'

Default logging level, case insensitive. One of the values DEBUG, INFO, WARNING, ERROR, CRITICAL.

LOG_EMAIL_LEVEL = 'error'

File logging level, case insensitive. One of the values DEBUG, INFO, WARNING, ERROR, CRITICAL.

LOG_FILE_LEVEL = 'info'

File logging level, case insensitive. One of the values DEBUG, INFO, WARNING, ERROR, CRITICAL.

MAIL_DEFAULT_SENDER = 'vial@alchemist.cesnet.cz'
MAIL_PASSWORD = None
MAIL_PORT = 25
MAIL_SERVER = 'localhost'
MAIL_SUBJECT_PREFIX = '[Vial]'
MAIL_USERNAME = None
MENU_MAIN_SKELETON = [{'entry_type': 'submenu', 'ident': 'admin', 'position': 300, 'authentication': True, 'authorization': ['power'], 'title': l'Administration', 'resptitle': True, 'icon': 'section-administration'}, {'entry_type': 'submenu', 'ident': 'developer', 'position': 400, 'authentication': True, 'authorization': ['developer'], 'title': l'Development', 'resptitle': True, 'icon': 'section-development'}]

Configuration of application menu skeleton.

MIGRATE_DIRECTORY = '/home/buildbot/workers/worker-mentat-py3/mentat-doc/build/lib/vial/migrations'
MODELS = {}

Models to be used within the application.

ROLES = ['user', 'developer', 'maintainer', 'admin']

List of all valid user roles supported by the application.

SECRET_KEY = 'default-secret-key'
SQLALCHEMY_SETUP_ARGS = {}
SQLALCHEMY_TRACK_MODIFICATIONS = False
SUPPORTED_LOCALES = {'cs': 'Česky', 'en': 'English'}

List of all languages (locales) supported by the application.

TESTING = False
WTF_CSRF_ENABLED = True
class vial.config.DevelopmentConfig[source]

Bases: vial.config.Config

Class containing application configurations for development environment.

DEBUG = True
ENABLED_BLUEPRINTS = ['vial.blueprints.auth', 'vial.blueprints.auth_api', 'vial.blueprints.auth_dev', 'vial.blueprints.auth_env', 'vial.blueprints.auth_pwd', 'vial.blueprints.devtools', 'vial.blueprints.design_bs3', 'vial.blueprints.home', 'vial.blueprints.users', 'vial.blueprints.groups', 'vial.blueprints.changelogs']
ENDPOINT_LOGIN = 'auth_dev.login'
LOG_DEFAULT_LEVEL = 'debug'
LOG_FILE_LEVEL = 'debug'
class vial.config.ProductionConfig[source]

Bases: vial.config.Config

Class containing application configurations for production environment.

class vial.config.TestingConfig[source]

Bases: vial.config.Config

Class containing testing Vial applications` configurations.

ENABLED_BLUEPRINTS = ['vial.blueprints.auth', 'vial.blueprints.auth_api', 'vial.blueprints.auth_dev', 'vial.blueprints.auth_env', 'vial.blueprints.auth_pwd', 'vial.blueprints.devtools', 'vial.blueprints.design_bs3', 'vial.blueprints.home', 'vial.blueprints.users', 'vial.blueprints.groups', 'vial.blueprints.changelogs']
ENDPOINT_LOGIN = 'auth_dev.login'
EXPLAIN_TEMPLATE_LOADING = False
TESTING = True