passerelle/passerelle/default_settings.py

116 lines
3.1 KiB
Python

# Django default settings for passerelle project.
from django.conf import global_settings
import os
import logging
try:
from logging.handlers import NullHandler
except ImportError:
# python < 2.7
class NullHandler(logging.Handler):
def emit(self, record):
pass
logging.getLogger('passerelle').addHandler(NullHandler())
PACKAGE_PATH = os.path.dirname(__file__)
### Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/dev/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'please-change-me-with-a-very-long-random-string'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
TEMPLATE_DEBUG = True
# See https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
ALLOWED_HOSTS = []
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'passerelle.sqlite3',
}
}
### End of "Quick-start development settings"
# If you set this to False, Django will not format dates, numbers and
# calendars according to the current locale.
USE_L10N = True
# If you set this to False, Django will not use timezone-aware datetimes.
USE_TZ = True
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash.
# Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
MEDIA_URL = '/media/'
# URL prefix for static files.
# Example: "http://media.lawrence.com/static/"
STATIC_URL = '/static/'
# Additional locations of static files
STATICFILES_DIRS = (os.path.join(PACKAGE_PATH, 'static'),)
# List of finder classes that know how to find static files in
# various locations.
STATICFILES_FINDERS = global_settings.STATICFILES_FINDERS + ('gadjo.finders.XStaticFinder',)
MIDDLEWARE_CLASSES = global_settings.MIDDLEWARE_CLASSES + (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'passerelle.base.middleware.SearchApiUser'
)
ROOT_URLCONF = 'passerelle.urls'
# Python dotted path to the WSGI application used by Django's runserver.
WSGI_APPLICATION = 'passerelle.wsgi.application'
LOCALE_PATHS = (os.path.join(PACKAGE_PATH, 'locale'),)
LANGUAGE_CODE = 'fr-fr'
TEMPLATE_DIRS = (os.path.join(PACKAGE_PATH, 'templates'),)
TEMPLATE_CONTEXT_PROCESSORS = global_settings.TEMPLATE_CONTEXT_PROCESSORS + (
'django.core.context_processors.request',
'passerelle.base.context_processors.template_vars',
)
INSTALLED_APPS = (
# system apps
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'south',
# base apps
'passerelle.base',
'passerelle.datasources',
'passerelle.repost',
# connectors
'clicrdv',
'gdc',
'choosit',
'oxyd',
'ovh',
'mobyt',
'pastell',
'concerto',
'bdp',
# backoffice templates and static
'gadjo',
)
LOGIN_REDIRECT_URL = 'homepage'