Make database settings configurable
This commit is contained in:
parent
b1798cf33f
commit
b33fae4ccd
3 changed files with 31 additions and 14 deletions
|
|
@ -40,7 +40,9 @@ MIDDLEWARE = (
|
|||
{% if mailman.web.remote_user %}
|
||||
'django.contrib.auth.middleware.PersistentRemoteUserMiddleware',
|
||||
{% endif %}
|
||||
{% if mailman.web.ldap %}
|
||||
'postorius_ldap_membership_management.middleware.SessionTimeoutMiddleware',
|
||||
{% endif %}
|
||||
)
|
||||
|
||||
# Application definition
|
||||
|
|
@ -90,29 +92,30 @@ AUTHENTICATION_BACKENDS = (
|
|||
# https://docs.djangoproject.com/en/1.8/ref/settings/#databases
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'default': {{ mailman.web.db|pprint|indent(15) }}
|
||||
#{
|
||||
# Use 'sqlite3', 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
#'ENGINE': 'django.db.backends.sqlite3',
|
||||
#'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
||||
#'ENGINE': 'django.db.backends.mysql',
|
||||
# DB name or path to database file if using sqlite3.
|
||||
'NAME': '/var/lib/mailman3/web/mailman3web.db',
|
||||
#'NAME': '/var/lib/mailman3/web/mailman3web.db',
|
||||
# The following settings are not used with sqlite3:
|
||||
'USER': '',
|
||||
'PASSWORD': '',
|
||||
#'USER': '',
|
||||
#'PASSWORD': '',
|
||||
# HOST: empty for localhost through domain sockets or '127.0.0.1' for
|
||||
# localhost through TCP.
|
||||
'HOST': '',
|
||||
#'HOST': '',
|
||||
# PORT: set to empty string for default.
|
||||
'PORT': '',
|
||||
#'PORT': '',
|
||||
# OPTIONS: Extra parameters to use when connecting to the database.
|
||||
'OPTIONS': {
|
||||
#'OPTIONS': {
|
||||
# Set sql_mode to 'STRICT_TRANS_TABLES' for MySQL. See
|
||||
# https://docs.djangoproject.com/en/1.11/ref/
|
||||
# databases/#setting-sql-mode
|
||||
#'init_command': "SET sql_mode='STRICT_TRANS_TABLES'",
|
||||
},
|
||||
}
|
||||
#},
|
||||
#}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue