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