2015-02-25 11:06:00 -06:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
2014-12-16 09:54:29 -06:00
|
|
|
##########################################################################
|
|
|
|
#
|
|
|
|
# pgAdmin 4 - PostgreSQL Tools
|
|
|
|
#
|
2016-01-18 08:48:14 -06:00
|
|
|
# Copyright (C) 2013 - 2016, The pgAdmin Development Team
|
2014-12-16 09:54:29 -06:00
|
|
|
# This software is released under the PostgreSQL Licence
|
|
|
|
#
|
2015-10-20 02:03:18 -05:00
|
|
|
# config.py - Core application configuration settings
|
2014-12-16 09:54:29 -06:00
|
|
|
#
|
|
|
|
##########################################################################
|
|
|
|
|
|
|
|
from logging import *
|
2015-01-22 09:56:23 -06:00
|
|
|
import os
|
2014-12-16 09:54:29 -06:00
|
|
|
|
2014-12-17 06:52:43 -06:00
|
|
|
##########################################################################
|
|
|
|
# Application settings
|
|
|
|
##########################################################################
|
|
|
|
|
|
|
|
# Name of the application to display in the UI
|
|
|
|
APP_NAME = 'pgAdmin 4'
|
2015-06-30 00:51:55 -05:00
|
|
|
APP_ICON = 'icon-postgres-alt'
|
2014-12-17 06:52:43 -06:00
|
|
|
|
|
|
|
# Application version number components
|
|
|
|
APP_MAJOR = 1
|
|
|
|
APP_MINOR = 0
|
|
|
|
APP_REVISION = 0
|
|
|
|
|
|
|
|
# Application version suffix, e.g. 'beta1', 'dev'. Usually an empty string
|
|
|
|
# for GA releases.
|
|
|
|
APP_SUFFIX = 'dev'
|
|
|
|
|
2015-01-27 10:54:39 -06:00
|
|
|
# Copyright string for display in the app
|
2016-01-18 08:48:14 -06:00
|
|
|
APP_COPYRIGHT = 'Copyright 2013 - 2016, The pgAdmin Development Team'
|
2015-01-27 10:54:39 -06:00
|
|
|
|
2015-10-20 02:03:18 -05:00
|
|
|
# Path to the online help.
|
2015-02-23 04:51:47 -06:00
|
|
|
HELP_PATH = '../../../docs/en_US/_build/html/'
|
|
|
|
|
2015-02-25 11:06:00 -06:00
|
|
|
# Languages we support in the UI
|
|
|
|
LANGUAGES = {
|
|
|
|
'en': 'English',
|
|
|
|
'fr': 'Français'
|
|
|
|
}
|
|
|
|
|
2014-12-17 06:52:43 -06:00
|
|
|
# DO NOT CHANGE!
|
|
|
|
# The application version string, constructed from the components
|
|
|
|
APP_VERSION = '%s.%s.%s-%s' % (APP_MAJOR, APP_MINOR, APP_REVISION, APP_SUFFIX)
|
|
|
|
|
2015-01-20 06:32:06 -06:00
|
|
|
# DO NOT CHANGE UNLESS YOU KNOW WHAT YOU ARE DOING!
|
|
|
|
# List of modules to skip when dynamically loading
|
2015-10-20 02:03:18 -05:00
|
|
|
MODULE_BLACKLIST = ['test']
|
2014-12-18 11:49:09 -06:00
|
|
|
|
2015-02-15 16:10:53 -06:00
|
|
|
# DO NOT CHANGE UNLESS YOU KNOW WHAT YOU ARE DOING!
|
|
|
|
# List of treeview browser nodes to skip when dynamically loading
|
2015-10-20 02:03:18 -05:00
|
|
|
NODE_BLACKLIST = []
|
2015-02-15 16:10:53 -06:00
|
|
|
|
2014-12-16 11:14:48 -06:00
|
|
|
##########################################################################
|
|
|
|
# Log settings
|
|
|
|
##########################################################################
|
|
|
|
|
2014-12-16 11:37:53 -06:00
|
|
|
# Debug mode?
|
2014-12-18 11:49:09 -06:00
|
|
|
DEBUG = False
|
2014-12-16 11:37:53 -06:00
|
|
|
|
2014-12-16 09:54:29 -06:00
|
|
|
# Application log level - one of:
|
2015-10-20 02:03:18 -05:00
|
|
|
# CRITICAL 50
|
|
|
|
# ERROR 40
|
|
|
|
# WARNING 30
|
|
|
|
# SQL 25
|
|
|
|
# INFO 20
|
|
|
|
# DEBUG 10
|
|
|
|
# NOTSET 0
|
2014-12-16 11:14:48 -06:00
|
|
|
CONSOLE_LOG_LEVEL = WARNING
|
2014-12-18 11:49:09 -06:00
|
|
|
FILE_LOG_LEVEL = INFO
|
2014-12-16 11:14:48 -06:00
|
|
|
|
2015-10-20 02:03:18 -05:00
|
|
|
# Log format.
|
|
|
|
CONSOLE_LOG_FORMAT = '%(asctime)s: %(levelname)s\t%(name)s:\t%(message)s'
|
|
|
|
FILE_LOG_FORMAT = '%(asctime)s: %(levelname)s\t%(name)s:\t%(message)s'
|
2014-12-16 09:54:29 -06:00
|
|
|
|
|
|
|
# Log file name
|
2014-12-16 11:14:48 -06:00
|
|
|
LOG_FILE = 'pgadmin4.log'
|
|
|
|
|
|
|
|
##########################################################################
|
|
|
|
# Server settings
|
|
|
|
##########################################################################
|
|
|
|
|
2015-01-26 09:20:28 -06:00
|
|
|
# The server mode determines whether or not we're running on a web server
|
|
|
|
# requiring user authentication, or desktop mode which uses an automatic
|
|
|
|
# default login.
|
|
|
|
#
|
|
|
|
# DO NOT DISABLE SERVER MODE IF RUNNING ON A WEBSERVER!!
|
|
|
|
SERVER_MODE = True
|
|
|
|
|
|
|
|
# User ID (email address) to use for the default user in desktop mode.
|
|
|
|
# The default should be fine here, as it's not exposed in the app.
|
|
|
|
DESKTOP_USER = 'pgadmin4@pgadmin.org'
|
|
|
|
|
2014-12-16 11:14:48 -06:00
|
|
|
# The default port on which the app server will listen if not set in the
|
|
|
|
# environment by the runtime
|
|
|
|
DEFAULT_SERVER_PORT = 5050
|
2014-12-16 09:54:29 -06:00
|
|
|
|
2014-12-16 11:37:53 -06:00
|
|
|
# Enable CSRF protection?
|
|
|
|
CSRF_ENABLED = True
|
|
|
|
|
2015-10-20 02:03:18 -05:00
|
|
|
# Secret key for signing CSRF data. Override this in config_local.py if
|
2014-12-16 11:37:53 -06:00
|
|
|
# running on a web server
|
2015-01-22 09:56:23 -06:00
|
|
|
CSRF_SESSION_KEY = 'SuperSecret1'
|
2014-12-16 11:37:53 -06:00
|
|
|
|
2015-10-20 02:03:18 -05:00
|
|
|
# Secret key for signing cookies. Override this in config_local.py if
|
2014-12-16 11:37:53 -06:00
|
|
|
# running on a web server
|
2015-01-22 09:56:23 -06:00
|
|
|
SECRET_KEY = 'SuperSecret2'
|
|
|
|
|
|
|
|
# Salt used when hashing passwords. Override this in config_local.py if
|
|
|
|
# running on a web server
|
|
|
|
SECURITY_PASSWORD_SALT = 'SuperSecret3'
|
|
|
|
|
|
|
|
# Hashing algorithm used for password storage
|
|
|
|
SECURITY_PASSWORD_HASH = 'pbkdf2_sha512'
|
|
|
|
|
2015-02-12 04:28:15 -06:00
|
|
|
# Should HTML be minified on the fly when not in debug mode?
|
2015-10-20 02:03:18 -05:00
|
|
|
MINIFY_HTML = True
|
2015-02-12 04:28:15 -06:00
|
|
|
|
2015-10-22 01:19:53 -05:00
|
|
|
|
|
|
|
##########################################################################
|
|
|
|
# Server Connection Driver Settings
|
|
|
|
##########################################################################
|
|
|
|
|
|
|
|
# The default driver used for making connection with PostgreSQL
|
|
|
|
PG_DEFAULT_DRIVER = 'psycopg2'
|
|
|
|
|
|
|
|
# Maximum allowed idle time in minutes before which releasing the connection
|
|
|
|
# for the particular session. (in minutes)
|
|
|
|
MAX_SESSION_IDLE_TIME = 60
|
|
|
|
|
2015-01-22 09:56:23 -06:00
|
|
|
##########################################################################
|
|
|
|
# User account and settings storage
|
|
|
|
##########################################################################
|
|
|
|
|
2015-03-09 10:06:10 -05:00
|
|
|
# The schema version number for the configuration database
|
|
|
|
# DO NOT CHANGE UNLESS YOU ARE A PGADMIN DEVELOPER!!
|
2016-03-07 05:48:24 -06:00
|
|
|
SETTINGS_SCHEMA_VERSION = 8
|
2015-03-09 10:06:10 -05:00
|
|
|
|
2015-01-22 09:56:23 -06:00
|
|
|
# The default path to the SQLite database used to store user accounts and
|
|
|
|
# settings. This default places the file in the same directory as this
|
|
|
|
# config file, but generates an absolute path for use througout the app.
|
2015-10-20 02:03:18 -05:00
|
|
|
SQLITE_PATH = os.path.join(
|
|
|
|
os.path.dirname(os.path.realpath(__file__)),
|
|
|
|
'pgadmin4.db'
|
|
|
|
)
|
2015-01-22 09:56:23 -06:00
|
|
|
|
|
|
|
##########################################################################
|
|
|
|
# Mail server settings
|
|
|
|
##########################################################################
|
|
|
|
|
|
|
|
# These settings are used when running in web server mode for confirming
|
|
|
|
# and resetting passwords etc.
|
|
|
|
MAIL_SERVER = 'smtp.gmail.com'
|
|
|
|
MAIL_PORT = 465
|
|
|
|
MAIL_USE_SSL = True
|
|
|
|
MAIL_USERNAME = 'username'
|
|
|
|
MAIL_PASSWORD = 'SuperSecret'
|
|
|
|
|
|
|
|
##########################################################################
|
|
|
|
# Mail content settings
|
|
|
|
##########################################################################
|
|
|
|
|
|
|
|
# These settings define the content of password reset emails
|
2015-10-20 02:03:18 -05:00
|
|
|
SECURITY_EMAIL_SUBJECT_PASSWORD_RESET = "Password reset instructions for %s" \
|
|
|
|
% APP_NAME
|
|
|
|
SECURITY_EMAIL_SUBJECT_PASSWORD_NOTICE = "Your %s password has been reset" \
|
|
|
|
% APP_NAME
|
|
|
|
SECURITY_EMAIL_SUBJECT_PASSWORD_CHANGE_NOTICE = \
|
|
|
|
"Your password for %s has been changed" % APP_NAME
|
2014-12-16 11:37:53 -06:00
|
|
|
|
2016-02-08 10:28:20 -06:00
|
|
|
##########################################################################
|
|
|
|
# Upgrade checks
|
|
|
|
##########################################################################
|
|
|
|
|
|
|
|
# Check for new versions of the application?
|
|
|
|
UPGRADE_CHECK_ENABLED = True
|
|
|
|
|
|
|
|
# Where should we get the data from?
|
|
|
|
UPGRADE_CHECK_URL = 'http://www.pgadmin.org/versions.json'
|
|
|
|
|
2014-12-16 11:14:48 -06:00
|
|
|
##########################################################################
|
|
|
|
# Local config settings
|
|
|
|
##########################################################################
|
2014-12-16 09:54:29 -06:00
|
|
|
|
|
|
|
# Load local config overrides
|
|
|
|
try:
|
|
|
|
from config_local import *
|
|
|
|
except ImportError:
|
|
|
|
pass
|