2015-01-05 15:01:42 +01:00
|
|
|
"""
|
2016-09-08 11:13:21 +02:00
|
|
|
Settings file for OpenSlides.
|
2015-01-05 15:01:42 +01:00
|
|
|
|
|
|
|
For more information on this file, see
|
2019-09-02 11:09:03 +02:00
|
|
|
https://github.com/OpenSlides/OpenSlides/blob/master/SETTINGS.rst
|
2015-01-05 15:01:42 +01:00
|
|
|
"""
|
2013-10-28 16:34:53 +01:00
|
|
|
|
2014-01-11 15:47:15 +01:00
|
|
|
import os
|
2013-10-28 16:34:53 +01:00
|
|
|
from openslides.global_settings import *
|
|
|
|
|
|
|
|
|
2015-01-05 15:01:42 +01:00
|
|
|
# OpenSlides plugins
|
|
|
|
# Add plugins to this list (see example entry in comment).
|
|
|
|
|
2013-12-12 21:22:42 +01:00
|
|
|
INSTALLED_PLUGINS += (
|
2016-05-17 14:15:22 +02:00
|
|
|
# 'plugin_module_name',
|
2013-10-28 16:34:53 +01:00
|
|
|
)
|
|
|
|
INSTALLED_APPS += INSTALLED_PLUGINS
|
|
|
|
|
2015-01-05 15:01:42 +01:00
|
|
|
|
2016-09-08 11:13:21 +02:00
|
|
|
# SECURITY WARNING: Keep the secret key used in production secret!
|
|
|
|
SECRET_KEY = %(secret_key)r
|
|
|
|
|
|
|
|
# Use 'DEBUG = True' to get more details for server errors.
|
|
|
|
# SECURITY WARNING: Don't run with debug turned on in production!
|
|
|
|
|
|
|
|
DEBUG = %(debug)s
|
|
|
|
|
2019-09-02 11:09:03 +02:00
|
|
|
# Controls the verbosity on errors during a reset password. If enabled, an error
|
|
|
|
# will be shown, if there does not exist a user with a given email address. So one
|
|
|
|
# can check, if a email is registered. If this is not wanted, disable verbose
|
|
|
|
# messages. An success message will always be shown.
|
|
|
|
|
|
|
|
RESET_PASSWORD_VERBOSE_ERRORS = True
|
|
|
|
|
2017-11-28 10:47:29 +01:00
|
|
|
# Email settings
|
2020-10-28 08:34:43 +01:00
|
|
|
# For an explaination and more settings values see https://docs.djangoproject.com/en/2.2/topics/email/#smtp-backend
|
2017-11-28 10:47:29 +01:00
|
|
|
|
|
|
|
EMAIL_HOST = 'localhost'
|
|
|
|
EMAIL_PORT = 587
|
|
|
|
EMAIL_HOST_USER = ''
|
|
|
|
EMAIL_HOST_PASSWORD = ''
|
2020-10-28 08:34:43 +01:00
|
|
|
EMAIL_USE_SSL = False
|
|
|
|
EMAIL_USE_TLS = False
|
|
|
|
EMAIL_TIMEOUT = None
|
2019-06-25 15:49:15 +02:00
|
|
|
DEFAULT_FROM_EMAIL = 'noreply@example.com'
|
2016-09-08 11:13:21 +02:00
|
|
|
|
2019-02-25 09:28:32 +01:00
|
|
|
# Increasing Upload size to 100mb (default is 2.5mb)
|
|
|
|
DATA_UPLOAD_MAX_MEMORY_SIZE = 104857600
|
|
|
|
|
2015-01-05 15:01:42 +01:00
|
|
|
# Database
|
2021-02-04 17:57:01 +01:00
|
|
|
# https://docs.djangoproject.com/en/2.2/ref/settings/#databases
|
2016-09-08 11:13:21 +02:00
|
|
|
|
|
|
|
# Change this setting to use e. g. PostgreSQL or MySQL.
|
2015-01-05 15:01:42 +01:00
|
|
|
|
2016-09-30 21:43:22 +02:00
|
|
|
# DATABASES = {
|
|
|
|
# 'default': {
|
|
|
|
# 'ENGINE': 'django.db.backends.postgresql',
|
|
|
|
# 'NAME': 'mydatabase',
|
|
|
|
# 'USER': 'mydatabaseuser',
|
|
|
|
# 'PASSWORD': 'mypassword',
|
|
|
|
# 'HOST': '127.0.0.1',
|
|
|
|
# 'PORT': '5432',
|
|
|
|
# }
|
|
|
|
# }
|
|
|
|
|
2015-01-05 15:01:42 +01:00
|
|
|
DATABASES = {
|
|
|
|
'default': {
|
|
|
|
'ENGINE': 'django.db.backends.sqlite3',
|
2018-01-16 16:02:23 +01:00
|
|
|
'NAME': os.path.join(OPENSLIDES_USER_DATA_DIR, 'db.sqlite3'),
|
2015-01-05 15:01:42 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-05-28 11:40:41 +02:00
|
|
|
# Collection Cache
|
|
|
|
REDIS_ADDRESS = "redis://redis:6379/0"
|
|
|
|
|
2016-09-08 11:13:21 +02:00
|
|
|
|
2019-08-20 12:00:54 +02:00
|
|
|
# SAML integration
|
|
|
|
# Please read https://github.com/OpenSlides/OpenSlides/blob/master/openslides/saml/README.md
|
|
|
|
# for additional requirements.
|
|
|
|
|
|
|
|
ENABLE_SAML = False
|
|
|
|
if ENABLE_SAML:
|
|
|
|
INSTALLED_APPS += ['openslides.saml']
|
|
|
|
|
2016-05-29 08:29:14 +02:00
|
|
|
|
2019-11-05 09:30:55 +01:00
|
|
|
# Controls if electronic voting (means non-analog polls) are enabled.
|
|
|
|
ENABLE_ELECTRONIC_VOTING = False
|
|
|
|
|
2021-02-09 16:06:44 +01:00
|
|
|
# Controls if chat should be enabled
|
|
|
|
ENABLE_CHAT = False
|
2019-11-05 09:30:55 +01:00
|
|
|
|
2020-05-14 13:29:55 +02:00
|
|
|
# Jitsi integration
|
|
|
|
# JITSI_DOMAIN = None
|
|
|
|
# JITSI_ROOM_NAME = None
|
2020-08-21 15:46:43 +02:00
|
|
|
# JITSI_ROOM_PASSWORD = None
|
2020-05-14 13:29:55 +02:00
|
|
|
|
|
|
|
|
2016-09-08 11:13:21 +02:00
|
|
|
# Internationalization
|
2021-02-04 17:57:01 +01:00
|
|
|
# https://docs.djangoproject.com/en/2.2/topics/i18n/
|
2014-01-11 15:47:15 +01:00
|
|
|
TIME_ZONE = 'Europe/Berlin'
|
|
|
|
|
|
|
|
|
2017-04-13 16:19:20 +02:00
|
|
|
# Password validation
|
2021-02-04 17:57:01 +01:00
|
|
|
# https://docs.djangoproject.com/en/2.2/topics/auth/passwords/#module-django.contrib.auth.password_validation
|
2017-04-13 16:19:20 +02:00
|
|
|
# AUTH_PASSWORD_VALIDATORS = []
|
|
|
|
|
2017-09-18 09:40:57 +02:00
|
|
|
|
2019-05-06 13:00:40 +02:00
|
|
|
# Logging
|
|
|
|
# see https://docs.djangoproject.com/en/2.2/topics/logging/
|
|
|
|
LOGGING = {
|
|
|
|
'version': 1,
|
|
|
|
'disable_existing_loggers': False,
|
|
|
|
'formatters': {
|
|
|
|
'gunicorn': {
|
|
|
|
'format': '{asctime} [{process:d}] [{levelname}] {name} {message}',
|
|
|
|
'style': '{',
|
|
|
|
'datefmt': '[%%Y-%%m-%%d %%H:%%M:%%S %%z]',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'handlers': {
|
|
|
|
'console': {
|
|
|
|
'class': 'logging.StreamHandler',
|
|
|
|
'formatter': 'gunicorn',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'loggers': {
|
|
|
|
'django': {
|
|
|
|
'handlers': ['console'],
|
|
|
|
'level': os.getenv('DJANGO_LOG_LEVEL', 'INFO'),
|
|
|
|
},
|
|
|
|
'openslides': {
|
|
|
|
'handlers': ['console'],
|
|
|
|
'level': os.getenv('OPENSLIDES_LOG_LEVEL', 'INFO'),
|
|
|
|
}
|
|
|
|
},
|
|
|
|
}
|
2019-08-20 12:00:54 +02:00
|
|
|
|
|
|
|
SETTINGS_FILEPATH = __file__
|