2015-02-25 11:06:00 -06:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
2014-12-16 09:54:29 -06:00
|
|
|
##########################################################################
|
|
|
|
#
|
|
|
|
# pgAdmin 4 - PostgreSQL Tools
|
|
|
|
#
|
2018-01-05 04:42:49 -06:00
|
|
|
# Copyright (C) 2013 - 2018, 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
|
|
|
#
|
|
|
|
##########################################################################
|
|
|
|
|
2017-08-25 04:54:28 -05:00
|
|
|
import logging
|
2015-01-22 09:56:23 -06:00
|
|
|
import os
|
2017-03-07 05:40:31 -06:00
|
|
|
import sys
|
|
|
|
|
2017-08-25 04:54:28 -05:00
|
|
|
if sys.version_info[0] >= 3:
|
|
|
|
import builtins
|
|
|
|
else:
|
|
|
|
import __builtin__ as builtins
|
|
|
|
|
2017-03-07 05:40:31 -06:00
|
|
|
# We need to include the root directory in sys.path to ensure that we can
|
|
|
|
# find everything we need when running in the standalone runtime.
|
|
|
|
root = os.path.dirname(os.path.realpath(__file__))
|
|
|
|
if sys.path[0] != root:
|
|
|
|
sys.path.insert(0, root)
|
|
|
|
|
Resolved quite a few file-system encoding/decoding related cases.
In order to resolve the non-ascii characters in path (in user directory,
storage path, etc) on windows, we have converted the path into the
short-path, so that - we don't need to deal with the encoding issues
(specially with Python 2).
We've resolved majority of the issues with this patch.
We still need couple issues to resolve after this in the same area.
TODO
* Add better support for non-ascii characters in the database name on
windows with Python 3
* Improve the messages created after the background processes by
different modules (such as Backup, Restore, Import/Export, etc.),
which does not show short-paths, and xml representable characters for
non-ascii characters, when found in the database objects, and the file
PATH.
Fixes #2174, #1797, #2166, #1940
Initial patch by: Surinder Kumar
Reviewed by: Murtuza Zabuawala
2017-03-07 04:00:57 -06:00
|
|
|
from pgadmin.utils import env, IS_PY2, IS_WIN, fs_short_path
|
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'
|
2017-09-29 00:37:22 -05:00
|
|
|
APP_ICON = 'pg-icon'
|
2014-12-17 06:52:43 -06:00
|
|
|
|
2016-07-22 10:14:57 -05:00
|
|
|
##########################################################################
|
|
|
|
# Application settings
|
|
|
|
##########################################################################
|
|
|
|
|
|
|
|
# NOTE!!!
|
|
|
|
# If you change any of APP_RELEASE, APP_REVISION or APP_SUFFIX, then you
|
|
|
|
# must also change APP_VERSION_INT to match.
|
2016-11-18 09:46:39 -06:00
|
|
|
#
|
2017-02-10 06:02:42 -06:00
|
|
|
# Any changes made here must also be made in runtime/pgAdmin4.pro and
|
|
|
|
# runtime/Info.plist
|
2016-11-18 09:46:39 -06:00
|
|
|
#
|
2016-07-22 10:14:57 -05:00
|
|
|
|
2014-12-17 06:52:43 -06:00
|
|
|
# Application version number components
|
2018-02-05 09:38:20 -06:00
|
|
|
APP_RELEASE = 3
|
2018-05-04 07:52:24 -05:00
|
|
|
APP_REVISION = 1
|
2014-12-17 06:52:43 -06:00
|
|
|
|
|
|
|
# Application version suffix, e.g. 'beta1', 'dev'. Usually an empty string
|
|
|
|
# for GA releases.
|
2018-05-04 07:52:24 -05:00
|
|
|
APP_SUFFIX = 'dev'
|
2014-12-17 06:52:43 -06:00
|
|
|
|
2016-07-22 10:14:57 -05:00
|
|
|
# Numeric application version for upgrade checks. Should be in the format:
|
|
|
|
# [X]XYYZZ, where X is the release version, Y is the revision, with a leading
|
|
|
|
# zero if needed, and Z represents the suffix, with a leading zero if needed
|
2018-03-21 05:48:52 -05:00
|
|
|
APP_VERSION_INT = 30001
|
2016-07-22 10:14:57 -05:00
|
|
|
|
|
|
|
# DO NOT CHANGE!
|
|
|
|
# The application version string, constructed from the components
|
2016-09-26 10:16:13 -05:00
|
|
|
if not APP_SUFFIX:
|
|
|
|
APP_VERSION = '%s.%s' % (APP_RELEASE, APP_REVISION)
|
|
|
|
else:
|
|
|
|
APP_VERSION = '%s.%s-%s' % (APP_RELEASE, APP_REVISION, APP_SUFFIX)
|
2016-07-22 10:14:57 -05:00
|
|
|
|
2015-01-27 10:54:39 -06:00
|
|
|
# Copyright string for display in the app
|
2016-11-18 09:46:39 -06:00
|
|
|
# Any changes made here must also be made in runtime/pgAdmin4.pro
|
2018-01-05 04:42:49 -06:00
|
|
|
APP_COPYRIGHT = 'Copyright 2013 - 2018, The pgAdmin Development Team'
|
2015-01-27 10:54:39 -06:00
|
|
|
|
2016-07-22 10:14:57 -05:00
|
|
|
##########################################################################
|
|
|
|
# Misc stuff
|
|
|
|
##########################################################################
|
|
|
|
|
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 = {
|
2016-11-16 03:40:56 -06:00
|
|
|
'en': 'English',
|
2017-04-05 08:02:46 -05:00
|
|
|
'zh': 'Chinese (Simplified)',
|
|
|
|
'de': 'German',
|
2018-03-15 05:58:39 -05:00
|
|
|
'fr': 'French',
|
2017-10-31 04:09:00 -05:00
|
|
|
'ja': 'Japanese',
|
2017-10-27 07:00:09 -05:00
|
|
|
'pl': 'Polish',
|
2017-10-31 04:09:00 -05:00
|
|
|
'ru': 'Russian'
|
2015-02-25 11:06:00 -06:00
|
|
|
}
|
|
|
|
|
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
|
|
|
##########################################################################
|
|
|
|
# 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!!
|
2017-08-25 04:54:28 -05:00
|
|
|
#
|
|
|
|
# We only set SERVER_MODE if it's not already set. That's to allow the
|
|
|
|
# runtime to force it to False.
|
|
|
|
#
|
|
|
|
# NOTE: If you change the value of SERVER_MODE in an included config file,
|
|
|
|
# you may also need to redefine any values below that are derived
|
|
|
|
# from it, notably various paths such as LOG_FILE and anything
|
|
|
|
# using DATA_DIR.
|
|
|
|
|
|
|
|
if builtins.SERVER_MODE is None:
|
|
|
|
SERVER_MODE = True
|
|
|
|
else:
|
|
|
|
SERVER_MODE = builtins.SERVER_MODE
|
2015-01-26 09:20:28 -06:00
|
|
|
|
|
|
|
# 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'
|
|
|
|
|
2017-06-15 09:18:59 -05:00
|
|
|
# This option allows the user to host the application on a LAN
|
2016-05-06 09:25:52 -05:00
|
|
|
# Default hosting is on localhost (DEFAULT_SERVER='localhost').
|
|
|
|
# To host pgAdmin4 over LAN set DEFAULT_SERVER='0.0.0.0' (or a specific
|
|
|
|
# adaptor address.
|
|
|
|
#
|
|
|
|
# NOTE: This is NOT recommended for production use, only for debugging
|
|
|
|
# or testing. Production installations should be run as a WSGI application
|
|
|
|
# behind Apache HTTPD.
|
2017-06-11 07:56:49 -05:00
|
|
|
DEFAULT_SERVER = '127.0.0.1'
|
2016-05-06 09:25:52 -05:00
|
|
|
|
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-01-22 09:56:23 -06:00
|
|
|
# Hashing algorithm used for password storage
|
|
|
|
SECURITY_PASSWORD_HASH = 'pbkdf2_sha512'
|
|
|
|
|
2016-10-19 03:22:38 -05:00
|
|
|
# NOTE: CSRF_SESSION_KEY, SECRET_KEY and SECURITY_PASSWORD_SALT are no
|
|
|
|
# longer part of the main configuration, but are stored in the
|
|
|
|
# configuration databases 'keys' table and are auto-generated.
|
|
|
|
|
2015-02-12 04:28:15 -06:00
|
|
|
# Should HTML be minified on the fly when not in debug mode?
|
2017-03-09 09:21:52 -06:00
|
|
|
# NOTE: The HTMLMIN module doesn't work with Python 2.6, so this option
|
|
|
|
# has no effect on <= Python 2.7.
|
2016-11-18 10:40:17 -06:00
|
|
|
MINIFY_PAGE = True
|
2015-02-12 04:28:15 -06:00
|
|
|
|
2017-08-25 04:54:28 -05:00
|
|
|
# Data directory for storage of config settings etc. This shouldn't normally
|
|
|
|
# need to be changed - it's here as various other settings depend on it.
|
|
|
|
# On Windows, we always store data in %APPDATA%\pgAdmin. On other platforms,
|
|
|
|
# if we're in server mode we use /var/lib/pgadmin, otherwise ~/.pgadmin
|
|
|
|
if IS_WIN:
|
|
|
|
# Use the short path on windows
|
|
|
|
DATA_DIR = os.path.realpath(
|
|
|
|
os.path.join(fs_short_path(env('APPDATA')), u"pgAdmin")
|
|
|
|
)
|
|
|
|
else:
|
|
|
|
if SERVER_MODE:
|
|
|
|
DATA_DIR = '/var/lib/pgadmin'
|
|
|
|
else:
|
|
|
|
DATA_DIR = os.path.realpath(os.path.expanduser(u'~/.pgadmin/'))
|
|
|
|
|
|
|
|
##########################################################################
|
|
|
|
# Log settings
|
|
|
|
##########################################################################
|
|
|
|
|
|
|
|
# Debug mode?
|
|
|
|
DEBUG = False
|
|
|
|
|
|
|
|
# Application log level - one of:
|
|
|
|
# CRITICAL 50
|
|
|
|
# ERROR 40
|
|
|
|
# WARNING 30
|
|
|
|
# SQL 25
|
|
|
|
# INFO 20
|
|
|
|
# DEBUG 10
|
|
|
|
# NOTSET 0
|
|
|
|
CONSOLE_LOG_LEVEL = logging.WARNING
|
|
|
|
FILE_LOG_LEVEL = logging.WARNING
|
|
|
|
|
|
|
|
# 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'
|
|
|
|
|
|
|
|
# Log file name. This goes in the data directory, except on non-Windows
|
|
|
|
# platforms in server mode.
|
|
|
|
if SERVER_MODE and not IS_WIN:
|
|
|
|
LOG_FILE = '/var/log/pgadmin/pgadmin4.log'
|
|
|
|
else:
|
|
|
|
LOG_FILE = os.path.join(DATA_DIR, 'pgadmin4.log')
|
|
|
|
|
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
|
|
|
|
##########################################################################
|
|
|
|
|
|
|
|
# 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.
|
Resolved quite a few file-system encoding/decoding related cases.
In order to resolve the non-ascii characters in path (in user directory,
storage path, etc) on windows, we have converted the path into the
short-path, so that - we don't need to deal with the encoding issues
(specially with Python 2).
We've resolved majority of the issues with this patch.
We still need couple issues to resolve after this in the same area.
TODO
* Add better support for non-ascii characters in the database name on
windows with Python 3
* Improve the messages created after the background processes by
different modules (such as Backup, Restore, Import/Export, etc.),
which does not show short-paths, and xml representable characters for
non-ascii characters, when found in the database objects, and the file
PATH.
Fixes #2174, #1797, #2166, #1940
Initial patch by: Surinder Kumar
Reviewed by: Murtuza Zabuawala
2017-03-07 04:00:57 -06:00
|
|
|
SQLITE_PATH = env('SQLITE_PATH') or os.path.join(DATA_DIR, 'pgadmin4.db')
|
|
|
|
|
2016-05-10 05:28:59 -05:00
|
|
|
# SQLITE_TIMEOUT will define how long to wait before throwing the error -
|
2016-06-20 05:23:24 -05:00
|
|
|
# OperationError due to database lock. On slower system, you may need to change
|
|
|
|
# this to some higher value.
|
2016-05-10 05:28:59 -05:00
|
|
|
# (Default: 500 milliseconds)
|
|
|
|
SQLITE_TIMEOUT = 500
|
2016-03-22 10:05:43 -05:00
|
|
|
|
2017-03-31 19:14:37 -05:00
|
|
|
# Allow database connection passwords to be saved if the user chooses.
|
|
|
|
# Set to False to disable password saving.
|
|
|
|
ALLOW_SAVE_PASSWORD = True
|
|
|
|
|
2016-03-22 10:05:43 -05:00
|
|
|
##########################################################################
|
|
|
|
# Server-side session storage path
|
|
|
|
#
|
|
|
|
# SESSION_DB_PATH (Default: $HOME/.pgadmin4/sessions)
|
|
|
|
##########################################################################
|
|
|
|
#
|
|
|
|
# We use SQLite for server-side session storage. There will be one
|
|
|
|
# SQLite database object per session created.
|
|
|
|
#
|
|
|
|
# Specify the path used to store your session objects.
|
|
|
|
#
|
|
|
|
# If the specified directory does not exist, the setup script will create
|
|
|
|
# it with permission mode 700 to keep the session database secure.
|
|
|
|
#
|
|
|
|
# On certain systems, you can use shared memory (tmpfs) for maximum
|
|
|
|
# scalability, for example, on Ubuntu:
|
|
|
|
#
|
|
|
|
# SESSION_DB_PATH = '/run/shm/pgAdmin4_session'
|
|
|
|
#
|
|
|
|
##########################################################################
|
Resolved quite a few file-system encoding/decoding related cases.
In order to resolve the non-ascii characters in path (in user directory,
storage path, etc) on windows, we have converted the path into the
short-path, so that - we don't need to deal with the encoding issues
(specially with Python 2).
We've resolved majority of the issues with this patch.
We still need couple issues to resolve after this in the same area.
TODO
* Add better support for non-ascii characters in the database name on
windows with Python 3
* Improve the messages created after the background processes by
different modules (such as Backup, Restore, Import/Export, etc.),
which does not show short-paths, and xml representable characters for
non-ascii characters, when found in the database objects, and the file
PATH.
Fixes #2174, #1797, #2166, #1940
Initial patch by: Surinder Kumar
Reviewed by: Murtuza Zabuawala
2017-03-07 04:00:57 -06:00
|
|
|
SESSION_DB_PATH = os.path.join(DATA_DIR, 'sessions')
|
2015-01-22 09:56:23 -06:00
|
|
|
|
2016-05-08 13:34:25 -05:00
|
|
|
SESSION_COOKIE_NAME = 'pga4_session'
|
|
|
|
|
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.
|
2016-08-23 05:41:31 -05:00
|
|
|
# See: http://pythonhosted.org/Flask-Mail/ for more info
|
|
|
|
MAIL_SERVER = 'localhost'
|
|
|
|
MAIL_PORT = 25
|
|
|
|
MAIL_USE_SSL = False
|
|
|
|
MAIL_USE_TLS = False
|
|
|
|
MAIL_USERNAME = ''
|
|
|
|
MAIL_PASSWORD = ''
|
|
|
|
MAIL_DEBUG = False
|
2015-01-22 09:56:23 -06:00
|
|
|
|
2017-11-28 03:29:31 -06:00
|
|
|
# Flask-Security overrides Flask-Mail's MAIL_DEFAULT_SENDER setting, so
|
|
|
|
# that should be set as such:
|
|
|
|
SECURITY_EMAIL_SENDER = 'no-reply@localhost'
|
|
|
|
|
2015-01-22 09:56:23 -06:00
|
|
|
##########################################################################
|
|
|
|
# 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" \
|
2016-06-21 08:21:06 -05:00
|
|
|
% APP_NAME
|
2015-10-20 02:03:18 -05:00
|
|
|
SECURITY_EMAIL_SUBJECT_PASSWORD_NOTICE = "Your %s password has been reset" \
|
2016-06-21 08:21:06 -05:00
|
|
|
% APP_NAME
|
2015-10-20 02:03:18 -05:00
|
|
|
SECURITY_EMAIL_SUBJECT_PASSWORD_CHANGE_NOTICE = \
|
2016-06-21 08:21:06 -05:00
|
|
|
"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?
|
2016-05-21 12:54:12 -05:00
|
|
|
UPGRADE_CHECK_URL = 'https://www.pgadmin.org/versions.json'
|
2016-02-08 10:28:20 -06:00
|
|
|
|
2016-05-12 13:34:28 -05:00
|
|
|
##########################################################################
|
|
|
|
# Storage Manager storage url config settings
|
|
|
|
# If user sets STORAGE_DIR to empty it will show all volumes if platform
|
|
|
|
# is Windows, '/' if it is Linux, Mac or any other unix type system.
|
|
|
|
|
|
|
|
# For example:
|
|
|
|
# 1. STORAGE_DIR = get_drive("C") or get_drive() # return C:/ by default
|
|
|
|
# where C can be any drive character such as "D", "E", "G" etc
|
|
|
|
# 2. Set path manually like
|
|
|
|
# STORAGE_DIR = "/path/to/directory/"
|
|
|
|
##########################################################################
|
Resolved quite a few file-system encoding/decoding related cases.
In order to resolve the non-ascii characters in path (in user directory,
storage path, etc) on windows, we have converted the path into the
short-path, so that - we don't need to deal with the encoding issues
(specially with Python 2).
We've resolved majority of the issues with this patch.
We still need couple issues to resolve after this in the same area.
TODO
* Add better support for non-ascii characters in the database name on
windows with Python 3
* Improve the messages created after the background processes by
different modules (such as Backup, Restore, Import/Export, etc.),
which does not show short-paths, and xml representable characters for
non-ascii characters, when found in the database objects, and the file
PATH.
Fixes #2174, #1797, #2166, #1940
Initial patch by: Surinder Kumar
Reviewed by: Murtuza Zabuawala
2017-03-07 04:00:57 -06:00
|
|
|
STORAGE_DIR = os.path.join(DATA_DIR, 'storage')
|
|
|
|
|
2016-11-23 06:44:13 -06:00
|
|
|
##########################################################################
|
|
|
|
# Default locations for binary utilities (pg_dump, pg_restore etc)
|
|
|
|
#
|
|
|
|
# These are intentionally left empty in the main config file, but are
|
|
|
|
# expected to be overridden by packagers in config_distro.py.
|
|
|
|
#
|
|
|
|
# A default location can be specified for each database driver ID, in
|
2016-11-23 07:35:27 -06:00
|
|
|
# a dictionary. Either an absolute or relative path can be specified.
|
|
|
|
# In cases where it may be difficult to know what the working directory
|
|
|
|
# is, "$DIR" can be specified. This will be replaced with the path to the
|
|
|
|
# top-level pgAdmin4.py file. For example, on macOS we might use:
|
|
|
|
#
|
|
|
|
# $DIR/../../SharedSupport
|
|
|
|
#
|
2016-11-23 06:44:13 -06:00
|
|
|
##########################################################################
|
|
|
|
DEFAULT_BINARY_PATHS = {
|
2018-03-08 03:33:43 -06:00
|
|
|
"pg": "",
|
2017-08-25 07:23:03 -05:00
|
|
|
"ppas": "",
|
|
|
|
"gpdb": ""
|
2016-11-23 06:44:13 -06:00
|
|
|
}
|
|
|
|
|
2016-09-14 10:26:12 -05:00
|
|
|
##########################################################################
|
|
|
|
# Test settings - used primarily by the regression suite, not for users
|
|
|
|
##########################################################################
|
|
|
|
|
|
|
|
# The default path for SQLite database for testing
|
|
|
|
TEST_SQLITE_PATH = os.path.join(DATA_DIR, 'test_pgadmin4.db')
|
|
|
|
|
2016-06-02 04:21:32 -05:00
|
|
|
##########################################################################
|
|
|
|
# Allows flask application to response to the each request asynchronously
|
|
|
|
##########################################################################
|
|
|
|
THREADED_MODE = True
|
|
|
|
|
2016-07-26 07:01:56 -05:00
|
|
|
##########################################################################
|
|
|
|
# Do not allow SQLALCHEMY to track modification as it is going to be
|
|
|
|
# deprecated in future
|
|
|
|
##########################################################################
|
|
|
|
SQLALCHEMY_TRACK_MODIFICATIONS = False
|
|
|
|
|
2017-06-27 08:03:04 -05:00
|
|
|
##########################################################################
|
|
|
|
# Number of records to fetch in one batch in query tool when query result
|
|
|
|
# set is large.
|
|
|
|
##########################################################################
|
|
|
|
ON_DEMAND_RECORD_COUNT = 1000
|
|
|
|
|
2018-03-07 10:35:33 -06:00
|
|
|
##########################################################################
|
|
|
|
# Allow users to display Gravatar image for their username in Server mode
|
|
|
|
##########################################################################
|
|
|
|
SHOW_GRAVATAR_IMAGE = True
|
|
|
|
|
2018-03-19 12:09:19 -05:00
|
|
|
##########################################################################
|
|
|
|
# Set cookie path
|
|
|
|
##########################################################################
|
|
|
|
COOKIE_DEFAULT_PATH = '/'
|
2018-03-23 05:14:02 -05:00
|
|
|
COOKIE_DEFAULT_DOMAIN = None
|
|
|
|
SESSION_COOKIE_DOMAIN = None
|
2018-05-09 08:04:50 -05:00
|
|
|
SESSION_COOKIE_SAMESITE = 'Lax'
|
2018-03-19 12:09:19 -05:00
|
|
|
|
2014-12-16 11:14:48 -06:00
|
|
|
##########################################################################
|
|
|
|
# Local config settings
|
|
|
|
##########################################################################
|
2014-12-16 09:54:29 -06:00
|
|
|
|
2016-06-15 14:56:27 -05:00
|
|
|
# Load distribution-specific config overrides
|
|
|
|
try:
|
|
|
|
from config_distro import *
|
|
|
|
except ImportError:
|
|
|
|
pass
|
|
|
|
|
2014-12-16 09:54:29 -06:00
|
|
|
# Load local config overrides
|
|
|
|
try:
|
|
|
|
from config_local import *
|
|
|
|
except ImportError:
|
|
|
|
pass
|
2018-05-04 05:27:27 -05:00
|
|
|
|
|
|
|
##########################################################################
|
|
|
|
# SSH Tunneling supports only for Python 2.7 and 3.4+
|
|
|
|
##########################################################################
|
|
|
|
SUPPORT_SSH_TUNNEL = False
|
|
|
|
if (
|
|
|
|
(sys.version_info[0] == 2 and sys.version_info[1] >= 7) or
|
|
|
|
(sys.version_info[0] == 3 and sys.version_info[1] >= 4)
|
|
|
|
):
|
|
|
|
SUPPORT_SSH_TUNNEL = True
|