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
|
2016-09-08 11:13:21 +02:00
|
|
|
https://docs.djangoproject.com/en/1.10/topics/settings/
|
2015-01-05 15:01:42 +01:00
|
|
|
|
|
|
|
For the full list of settings and their values, see
|
2016-09-08 11:13:21 +02:00
|
|
|
https://docs.djangoproject.com/en/1.10/ref/settings/
|
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 *
|
2014-01-11 15:47:15 +01:00
|
|
|
%(import_function)s
|
2015-01-05 15:01:42 +01:00
|
|
|
|
2014-01-11 15:47:15 +01:00
|
|
|
# Path to the directory for user specific data files
|
2015-01-05 15:01:42 +01:00
|
|
|
|
2014-01-11 15:47:15 +01:00
|
|
|
OPENSLIDES_USER_DATA_PATH = %(openslides_user_data_path)s
|
2013-10-28 16:34:53 +01:00
|
|
|
|
|
|
|
|
2015-01-05 15:01:42 +01:00
|
|
|
# OpenSlides plugins
|
2016-09-08 11:13:21 +02:00
|
|
|
|
2015-01-05 15:01:42 +01:00
|
|
|
# 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
|
|
|
# Important settings for production use
|
|
|
|
# https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
|
2015-01-05 15:01:42 +01:00
|
|
|
# Database
|
2016-09-08 11:13:21 +02:00
|
|
|
# https://docs.djangoproject.com/en/1.10/ref/settings/#databases
|
|
|
|
|
|
|
|
# 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',
|
2016-09-08 11:13:21 +02:00
|
|
|
'NAME': os.path.join(OPENSLIDES_USER_DATA_PATH, 'db.sqlite3'),
|
2015-01-05 15:01:42 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-09-08 11:13:21 +02:00
|
|
|
# Django Channels
|
|
|
|
|
|
|
|
# Unless you have only a small assembly uncomment the following lines to
|
|
|
|
# activate Redis as backend for Django Channels and Cache. You have to install
|
|
|
|
# a Redis server and the python packages asgi_redis and django-redis.
|
|
|
|
|
|
|
|
# https://channels.readthedocs.io/en/latest/backends.html#redis
|
2016-05-29 08:29:14 +02:00
|
|
|
|
|
|
|
# CHANNEL_LAYERS['default']['BACKEND'] = 'asgi_redis.RedisChannelLayer'
|
2016-09-08 11:13:21 +02:00
|
|
|
|
2016-09-30 21:43:22 +02:00
|
|
|
|
|
|
|
# Caching
|
|
|
|
|
|
|
|
# Django uses a inmemory cache at default. This supports only one thread. If
|
|
|
|
# you use more then one thread another caching backend is required. We recommand
|
|
|
|
# django-redis: https://niwinz.github.io/django-redis/latest/#_user_guide
|
2016-09-08 11:13:21 +02:00
|
|
|
|
2016-05-29 08:29:14 +02:00
|
|
|
# CACHES = {
|
|
|
|
# "default": {
|
|
|
|
# "BACKEND": "django_redis.cache.RedisCache",
|
2016-09-18 16:00:31 +02:00
|
|
|
# "LOCATION": "redis://127.0.0.1:6379/0",
|
2016-05-29 08:29:14 +02:00
|
|
|
# "OPTIONS": {
|
|
|
|
# "CLIENT_CLASS": "django_redis.client.DefaultClient",
|
|
|
|
# }
|
|
|
|
# }
|
|
|
|
# }
|
|
|
|
|
|
|
|
|
2016-09-08 11:13:21 +02:00
|
|
|
# Internationalization
|
|
|
|
# https://docs.djangoproject.com/en/1.10/topics/i18n/
|
2015-01-05 15:01:42 +01:00
|
|
|
|
2014-01-11 15:47:15 +01:00
|
|
|
TIME_ZONE = 'Europe/Berlin'
|
|
|
|
|
|
|
|
|
2016-09-08 11:13:21 +02:00
|
|
|
# Static files (CSS, JavaScript, Images)
|
|
|
|
# https://docs.djangoproject.com/en/1.10/howto/static-files/
|
2015-01-05 15:01:42 +01:00
|
|
|
|
|
|
|
STATICFILES_DIRS = [os.path.join(OPENSLIDES_USER_DATA_PATH, 'static')] + STATICFILES_DIRS
|
2013-10-28 16:34:53 +01:00
|
|
|
|
2016-09-08 11:13:21 +02:00
|
|
|
|
|
|
|
# Files
|
|
|
|
# https://docs.djangoproject.com/en/1.10/topics/files/
|
|
|
|
|
|
|
|
MEDIA_ROOT = os.path.join(OPENSLIDES_USER_DATA_PATH, 'media', '')
|
|
|
|
|
|
|
|
|
|
|
|
# Whoosh search library
|
|
|
|
# https://whoosh.readthedocs.io/en/latest/
|
|
|
|
|
2016-01-03 15:33:51 +01:00
|
|
|
SEARCH_INDEX = os.path.join(OPENSLIDES_USER_DATA_PATH, 'search_index')
|