2011-04-12 16:09:17 +02:00
|
|
|
# Django settings for euscanwww project.
|
|
|
|
|
2011-04-13 08:50:24 +02:00
|
|
|
import os.path
|
|
|
|
|
2011-04-12 16:09:17 +02:00
|
|
|
DEBUG = True
|
|
|
|
TEMPLATE_DEBUG = DEBUG
|
|
|
|
|
|
|
|
ADMINS = (
|
2011-04-13 08:50:24 +02:00
|
|
|
('admin', 'admin@example.com'),
|
2011-04-12 16:09:17 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
MANAGERS = ADMINS
|
|
|
|
|
2011-04-19 11:52:47 +02:00
|
|
|
"""
|
|
|
|
# MySQL Example:
|
2011-11-15 16:43:18 +01:00
|
|
|
'default': {
|
2011-04-15 19:28:37 +02:00
|
|
|
'ENGINE': 'django.db.backends.mysql',
|
|
|
|
'NAME': 'euscan',
|
2011-04-19 11:52:47 +02:00
|
|
|
'USER': 'euscan',
|
|
|
|
'PASSWORD': 'password',
|
|
|
|
'HOST': 'localhost',
|
|
|
|
'PORT': '',
|
2011-04-15 19:28:37 +02:00
|
|
|
'OPTIONS': {
|
|
|
|
'init_command': 'SET storage_engine=INNODB',
|
|
|
|
}
|
2011-11-15 16:43:18 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
# PostGreSQL Example:
|
|
|
|
'default': {
|
|
|
|
'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
|
|
|
'NAME': 'euscan',
|
|
|
|
'USER': 'euscan',
|
|
|
|
'PASSWORD': '',
|
|
|
|
'HOST': 'localhost',
|
|
|
|
'PORT': '',
|
|
|
|
},
|
2011-04-19 11:52:47 +02:00
|
|
|
"""
|
2011-04-19 11:54:53 +02:00
|
|
|
|
2011-12-11 14:32:55 +01:00
|
|
|
EUSCAN_ROOT = os.path.dirname(os.path.abspath(__file__))
|
|
|
|
|
2011-04-19 11:54:53 +02:00
|
|
|
DATABASES = {
|
|
|
|
'default': {
|
|
|
|
'ENGINE': 'django.db.backends.sqlite3',
|
2011-12-11 14:32:55 +01:00
|
|
|
'NAME': os.path.join(EUSCAN_ROOT, 'euscan.db')
|
2011-08-28 11:21:37 +02:00
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
CACHES = {
|
|
|
|
'default': {
|
|
|
|
'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
|
2011-12-11 14:32:55 +01:00
|
|
|
'LOCATION': os.path.join(EUSCAN_ROOT, 'euscan.cache'),
|
2011-04-12 16:09:17 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-12-11 14:32:55 +01:00
|
|
|
RRD_ROOT = os.path.join(EUSCAN_ROOT, 'rrd')
|
2011-05-03 08:19:01 +02:00
|
|
|
|
2011-04-12 16:09:17 +02:00
|
|
|
# Local time zone for this installation. Choices can be found here:
|
|
|
|
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
|
|
|
|
# although not all choices may be available on all operating systems.
|
|
|
|
# On Unix systems, a value of None will cause Django to use the same
|
|
|
|
# timezone as the operating system.
|
|
|
|
# If running in a Windows environment this must be set to the same as your
|
|
|
|
# system time zone.
|
2011-04-13 08:50:24 +02:00
|
|
|
TIME_ZONE = 'Europe/Paris'
|
2011-04-12 16:09:17 +02:00
|
|
|
|
|
|
|
# Language code for this installation. All choices can be found here:
|
|
|
|
# http://www.i18nguy.com/unicode/language-identifiers.html
|
|
|
|
LANGUAGE_CODE = 'en-us'
|
|
|
|
|
|
|
|
SITE_ID = 1
|
|
|
|
|
|
|
|
# If you set this to False, Django will make some optimizations so as not
|
|
|
|
# to load the internationalization machinery.
|
|
|
|
USE_I18N = True
|
|
|
|
|
|
|
|
# If you set this to False, Django will not format dates, numbers and
|
|
|
|
# calendars according to the current locale
|
|
|
|
USE_L10N = True
|
|
|
|
|
|
|
|
# Absolute filesystem path to the directory that will hold user-uploaded files.
|
|
|
|
# Example: "/home/media/media.lawrence.com/"
|
2011-12-11 14:32:55 +01:00
|
|
|
MEDIA_ROOT = os.path.join(EUSCAN_ROOT, 'media/')
|
2011-04-12 16:09:17 +02:00
|
|
|
|
|
|
|
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
|
|
|
|
# trailing slash if there is a path component (optional in other cases).
|
|
|
|
# Examples: "http://media.lawrence.com", "http://example.com/media/"
|
2011-04-14 19:28:38 +02:00
|
|
|
MEDIA_URL = '/media/'
|
2011-04-12 16:09:17 +02:00
|
|
|
|
|
|
|
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
|
|
|
|
# trailing slash.
|
|
|
|
# Examples: "http://foo.com/media/", "/media/".
|
2011-04-13 08:50:24 +02:00
|
|
|
ADMIN_MEDIA_PREFIX = '/admin-media/'
|
2011-04-12 16:09:17 +02:00
|
|
|
|
|
|
|
# Make this unique, and don't share it with anybody.
|
2011-11-15 16:43:18 +01:00
|
|
|
SECRET_KEY = '00000000000000000000000000000000000000000000000000'
|
2011-04-12 16:09:17 +02:00
|
|
|
|
|
|
|
# List of callables that know how to import templates from various sources.
|
|
|
|
TEMPLATE_LOADERS = (
|
|
|
|
'django.template.loaders.filesystem.Loader',
|
|
|
|
'django.template.loaders.app_directories.Loader',
|
|
|
|
# 'django.template.loaders.eggs.Loader',
|
|
|
|
)
|
|
|
|
|
|
|
|
MIDDLEWARE_CLASSES = (
|
|
|
|
'django.middleware.common.CommonMiddleware',
|
2011-08-28 11:21:37 +02:00
|
|
|
'django.middleware.cache.UpdateCacheMiddleware',
|
|
|
|
'django.middleware.cache.FetchFromCacheMiddleware',
|
2011-04-12 16:09:17 +02:00
|
|
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
|
|
|
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
2012-02-14 14:54:05 +01:00
|
|
|
# 'django.middleware.csrf.CsrfViewMiddleware',
|
2011-04-12 16:09:17 +02:00
|
|
|
'django.contrib.messages.middleware.MessageMiddleware',
|
|
|
|
)
|
|
|
|
|
2011-08-28 11:21:37 +02:00
|
|
|
CACHE_MIDDLEWARE_SECONDS=3600
|
|
|
|
CACHE_MIDDLEWARE_ANONYMOUS_ONLY=True
|
|
|
|
|
2011-04-12 16:09:17 +02:00
|
|
|
ROOT_URLCONF = 'euscanwww.urls'
|
|
|
|
|
2011-04-15 19:28:37 +02:00
|
|
|
FORCE_SCRIPT_NAME=""
|
|
|
|
|
2011-04-12 16:09:17 +02:00
|
|
|
TEMPLATE_DIRS = (
|
2011-12-11 14:32:55 +01:00
|
|
|
os.path.join(EUSCAN_ROOT, 'templates'),
|
2011-04-12 16:09:17 +02:00
|
|
|
)
|
|
|
|
|
2012-02-14 14:54:05 +01:00
|
|
|
TEMPLATE_CONTEXT_PROCESSORS = (
|
|
|
|
"django.contrib.auth.context_processors.auth",
|
|
|
|
"django.core.context_processors.debug",
|
|
|
|
"django.core.context_processors.i18n",
|
|
|
|
"django.core.context_processors.media",
|
|
|
|
"django.core.context_processors.static",
|
|
|
|
"django.contrib.messages.context_processors.messages",
|
|
|
|
"django.core.context_processors.request",
|
|
|
|
)
|
|
|
|
|
2011-04-12 16:09:17 +02:00
|
|
|
INSTALLED_APPS = (
|
|
|
|
'django.contrib.auth',
|
|
|
|
'django.contrib.contenttypes',
|
|
|
|
'django.contrib.sessions',
|
2011-11-15 17:08:29 +01:00
|
|
|
'django.contrib.sites',
|
2011-04-12 16:09:17 +02:00
|
|
|
'django.contrib.messages',
|
2011-11-15 17:08:29 +01:00
|
|
|
'django.contrib.admin',
|
2011-04-13 08:50:24 +02:00
|
|
|
'south',
|
|
|
|
'euscan',
|
2011-04-12 16:09:17 +02:00
|
|
|
# Uncomment the next line to enable admin documentation:
|
|
|
|
# 'django.contrib.admindocs',
|
|
|
|
)
|
2011-04-13 08:50:24 +02:00
|
|
|
|
2011-11-15 16:43:18 +01:00
|
|
|
try:
|
|
|
|
from local_settings import *
|
|
|
|
except ImportError, ex:
|
|
|
|
import sys
|
|
|
|
sys.stderr.write(\
|
|
|
|
("settings.py: error importing local settings file:\n" + \
|
|
|
|
"\t%s\n" + \
|
|
|
|
"Do you have a local_settings.py module?\n") % str(ex))
|
|
|
|
raise
|