OpenSlides/tests/settings.py

68 lines
1.3 KiB
Python
Raw Normal View History

"""
Settings file for OpenSlides' tests
"""
2013-03-14 22:18:56 +01:00
import os
from openslides.global_settings import * # noqa
2013-03-14 22:18:56 +01:00
# Path to the directory for user specific data files
OPENSLIDES_USER_DATA_PATH = os.path.realpath(os.path.dirname(__file__))
2013-03-14 22:18:56 +01:00
# SECURITY WARNING: Keep the secret key used in production secret!
SECRET_KEY = 'secret'
# Use 'DEBUG = True' to get more details for server errors.
# SECURITY WARNING: Don't run with debug turned on in production!
DEBUG = True
TEMPLATE_DEBUG = DEBUG
# OpenSlides plugins
# Add plugins to this list.
INSTALLED_PLUGINS += (
'tests.utils',
2013-03-14 22:18:56 +01:00
)
INSTALLED_APPS += INSTALLED_PLUGINS
# Database
# Change this to use MySQL or PostgreSQL.
# See https://docs.djangoproject.com/en/1.7/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ''
}
}
# Some other settings
TIME_ZONE = 'Europe/Berlin'
MEDIA_ROOT = os.path.join(OPENSLIDES_USER_DATA_PATH, '')
TEMPLATE_DIRS = (
os.path.join(OPENSLIDES_USER_DATA_PATH, 'templates'),
)
STATICFILES_DIRS.insert(0, os.path.join(OPENSLIDES_USER_DATA_PATH, 'static'))
HAYSTACK_CONNECTIONS['default']['STORAGE'] = 'ram'
# Special test settings
# Use a faster password hasher.
2013-10-31 09:43:19 +01:00
PASSWORD_HASHERS = (
'django.contrib.auth.hashers.MD5PasswordHasher',
)