2015-01-22 18:29:12 +01:00
|
|
|
"""
|
2016-09-08 11:13:21 +02:00
|
|
|
Settings file for OpenSlides' tests.
|
2015-01-22 18:29:12 +01:00
|
|
|
"""
|
|
|
|
|
|
|
|
import os
|
2015-06-16 10:37:23 +02:00
|
|
|
|
2015-01-22 18:29:12 +01:00
|
|
|
from openslides.global_settings import * # noqa
|
|
|
|
|
|
|
|
# Path to the directory for user specific data files
|
|
|
|
|
2016-09-08 11:13:21 +02:00
|
|
|
OPENSLIDES_USER_DATA_PATH = os.path.realpath(os.path.dirname(os.path.abspath(__file__)))
|
2015-01-22 18:29:12 +01:00
|
|
|
|
|
|
|
|
|
|
|
# OpenSlides plugins
|
2016-09-08 11:13:21 +02:00
|
|
|
|
2015-01-22 18:29:12 +01:00
|
|
|
# Add plugins to this list.
|
|
|
|
|
2016-06-16 10:59:35 +02:00
|
|
|
INSTALLED_PLUGINS += ( # noqa
|
2015-01-22 18:29:12 +01:00
|
|
|
'tests.old.utils',
|
|
|
|
)
|
|
|
|
|
2016-06-16 10:59:35 +02:00
|
|
|
INSTALLED_APPS += INSTALLED_PLUGINS # noqa
|
2015-01-22 18:29:12 +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/
|
|
|
|
|
|
|
|
SECRET_KEY = 'secret'
|
|
|
|
|
|
|
|
DEBUG = False
|
|
|
|
|
|
|
|
|
2015-01-22 18:29:12 +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-22 18:29:12 +01:00
|
|
|
|
|
|
|
DATABASES = {
|
|
|
|
'default': {
|
|
|
|
'ENGINE': 'django.db.backends.sqlite3',
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-09-08 11:13:21 +02:00
|
|
|
# Internationalization
|
|
|
|
# https://docs.djangoproject.com/en/1.10/topics/i18n/
|
2015-01-22 18:29:12 +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-22 18:29:12 +01:00
|
|
|
|
2016-06-16 10:59:35 +02:00
|
|
|
STATICFILES_DIRS.insert(0, os.path.join(OPENSLIDES_USER_DATA_PATH, 'static')) # noqa
|
2015-01-22 18:29:12 +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, '')
|
|
|
|
|
|
|
|
|
|
|
|
# Whoosh search library
|
|
|
|
# https://whoosh.readthedocs.io/en/latest/
|
|
|
|
|
2016-01-03 15:33:51 +01:00
|
|
|
SEARCH_INDEX = 'ram'
|
2015-01-22 18:29:12 +01:00
|
|
|
|
|
|
|
|
2016-09-08 11:13:21 +02:00
|
|
|
# Special settings only for testing
|
|
|
|
|
|
|
|
TEST_RUNNER = 'openslides.utils.test.OpenSlidesDiscoverRunner'
|
|
|
|
|
2015-01-22 18:29:12 +01:00
|
|
|
# Use a faster password hasher.
|
|
|
|
|
2016-09-08 11:13:21 +02:00
|
|
|
PASSWORD_HASHERS = [
|
2015-01-22 18:29:12 +01:00
|
|
|
'django.contrib.auth.hashers.MD5PasswordHasher',
|
2016-09-08 11:13:21 +02:00
|
|
|
]
|