1
|
# Django settings for aps42 project.
|
2
|
|
3
|
import os
|
4
|
|
5
|
from ..settings import PROJECT_PATH
|
6
|
|
7
|
DEBUG = True
|
8
|
TEMPLATE_DEBUG = DEBUG
|
9
|
|
10
|
ADMINS = (
|
11
|
# ('Your Name', 'your_email@example.com'),
|
12
|
)
|
13
|
|
14
|
MANAGERS = ADMINS
|
15
|
|
16
|
DATABASES = {
|
17
|
'default': {
|
18
|
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
|
19
|
'NAME': os.path.join(PROJECT_PATH, 'aps42.sqlite3'), # Or path to database file if using sqlite3.
|
20
|
'USER': '', # Not used with sqlite3.
|
21
|
'PASSWORD': '', # Not used with sqlite3.
|
22
|
'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
|
23
|
'PORT': '', # Set to empty string for default. Not used with sqlite3.
|
24
|
}
|
25
|
}
|
26
|
|
27
|
# Local time zone for this installation. Choices can be found here:
|
28
|
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
|
29
|
# although not all choices may be available on all operating systems.
|
30
|
# On Unix systems, a value of None will cause Django to use the same
|
31
|
# timezone as the operating system.
|
32
|
# If running in a Windows environment this must be set to the same as your
|
33
|
# system time zone.
|
34
|
TIME_ZONE = 'Europe/Paris'
|
35
|
|
36
|
# Language code for this installation. All choices can be found here:
|
37
|
# http://www.i18nguy.com/unicode/language-identifiers.html
|
38
|
LANGUAGE_CODE = 'fr-fr'
|
39
|
|
40
|
SITE_ID = 1
|
41
|
|
42
|
# If you set this to False, Django will make some optimizations so as not
|
43
|
# to load the internationalization machinery.
|
44
|
USE_I18N = True
|
45
|
|
46
|
# If you set this to False, Django will not format dates, numbers and
|
47
|
# calendars according to the current locale.
|
48
|
USE_L10N = True
|
49
|
|
50
|
# If you set this to False, Django will not use timezone-aware datetimes.
|
51
|
USE_TZ = True
|
52
|
|
53
|
# Absolute filesystem path to the directory that will hold user-uploaded files.
|
54
|
# Example: "/home/media/media.lawrence.com/media/"
|
55
|
MEDIA_ROOT = os.path.join(PROJECT_PATH, 'media')
|
56
|
|
57
|
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
|
58
|
# trailing slash.
|
59
|
# Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
|
60
|
MEDIA_URL = '/media/'
|
61
|
|
62
|
# Absolute path to the directory static files should be collected to.
|
63
|
# Don't put anything in this directory yourself; store your static files
|
64
|
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
|
65
|
# Example: "/home/media/media.lawrence.com/static/"
|
66
|
STATIC_ROOT = ''
|
67
|
|
68
|
# URL prefix for static files.
|
69
|
# Example: "http://media.lawrence.com/static/"
|
70
|
STATIC_URL = '/static/'
|
71
|
|
72
|
# Additional locations of static files
|
73
|
STATICFILES_DIRS = (
|
74
|
# Put strings here, like "/home/html/static" or "C:/www/django/static".
|
75
|
# Always use forward slashes, even on Windows.
|
76
|
# Don't forget to use absolute paths, not relative paths.
|
77
|
)
|
78
|
|
79
|
# List of finder classes that know how to find static files in
|
80
|
# various locations.
|
81
|
STATICFILES_FINDERS = (
|
82
|
'django.contrib.staticfiles.finders.FileSystemFinder',
|
83
|
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
|
84
|
# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
|
85
|
)
|
86
|
|
87
|
# Make this unique, and don't share it with anybody.
|
88
|
SECRET_KEY = 'ct(a@ny^_)8v-^)jkdzbktqg6ajfn6y!zdjum^(f_o!h0jeotq'
|
89
|
|
90
|
# List of callables that know how to import templates from various sources.
|
91
|
TEMPLATE_LOADERS = (
|
92
|
'django.template.loaders.filesystem.Loader',
|
93
|
'django.template.loaders.app_directories.Loader',
|
94
|
# 'django.template.loaders.eggs.Loader',
|
95
|
)
|
96
|
|
97
|
MIDDLEWARE_CLASSES = (
|
98
|
'django.middleware.common.CommonMiddleware',
|
99
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
100
|
'django.middleware.csrf.CsrfViewMiddleware',
|
101
|
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
102
|
'django.contrib.messages.middleware.MessageMiddleware',
|
103
|
# Uncomment the next line for simple clickjacking protection:
|
104
|
# 'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
105
|
)
|
106
|
|
107
|
ROOT_URLCONF = 'aps42.urls'
|
108
|
|
109
|
# Python dotted path to the WSGI application used by Django's runserver.
|
110
|
WSGI_APPLICATION = 'aps42.wsgi.application'
|
111
|
|
112
|
TEMPLATE_DIRS = (
|
113
|
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
|
114
|
# Always use forward slashes, even on Windows.
|
115
|
# Don't forget to use absolute paths, not relative paths.
|
116
|
)
|
117
|
|
118
|
INSTALLED_APPS = (
|
119
|
'django.contrib.auth',
|
120
|
'django.contrib.contenttypes',
|
121
|
'django.contrib.sessions',
|
122
|
'django.contrib.sites',
|
123
|
'django.contrib.messages',
|
124
|
'django.contrib.staticfiles',
|
125
|
'reversion',
|
126
|
'south',
|
127
|
# Uncomment the next line to enable the admin:
|
128
|
# 'django.contrib.admin',
|
129
|
# Uncomment the next line to enable admin documentation:
|
130
|
# 'django.contrib.admindocs',
|
131
|
'aps42.a42base',
|
132
|
)
|
133
|
|
134
|
# A sample logging configuration. The only tangible logging
|
135
|
# performed by this configuration is to send an email to
|
136
|
# the site admins on every HTTP 500 error when DEBUG=False.
|
137
|
# See http://docs.djangoproject.com/en/dev/topics/logging for
|
138
|
# more details on how to customize your logging configuration.
|
139
|
LOGGING = {
|
140
|
'version': 1,
|
141
|
'disable_existing_loggers': False,
|
142
|
'filters': {
|
143
|
'require_debug_false': {
|
144
|
'()': 'django.utils.log.RequireDebugFalse'
|
145
|
}
|
146
|
},
|
147
|
'handlers': {
|
148
|
'mail_admins': {
|
149
|
'level': 'ERROR',
|
150
|
'filters': ['require_debug_false'],
|
151
|
'class': 'django.utils.log.AdminEmailHandler'
|
152
|
}
|
153
|
},
|
154
|
'loggers': {
|
155
|
'django.request': {
|
156
|
'handlers': ['mail_admins'],
|
157
|
'level': 'ERROR',
|
158
|
'propagate': True,
|
159
|
},
|
160
|
}
|
161
|
}
|