fix
[auf_skeleton_django.git] / project_name / settings / base.py
CommitLineData
87a6b693
OL
1# -*- coding: utf-8 -*-
2
3import os
4import socket
5
6from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS as \
7 DEFAULT_TEMPLATE_CONTEXT_PROCESSORS
8from django.conf.global_settings import MIDDLEWARE_CLASSES as \
9 DEFAULT_MIDDLEWARE_CLASSES
10
11
12# Paths
13SETTINGS_PATH = os.path.dirname(__file__)
14PROJECT_PATH = os.path.dirname(SETTINGS_PATH)
15ROOT_PATH = os.path.dirname(PROJECT_PATH)
16MEDIA_ROOT = os.path.join(ROOT_PATH, 'media')
17STATIC_ROOT = os.path.join(ROOT_PATH, 'sitestatic')
18
19# Rapports d'erreurs
20SERVER_EMAIL = 'ne-pas-repondre@auf.org'
21EMAIL_SUBJECT_PREFIX = '[%s - %s] ' % (socket.gethostname(), PROJECT_PATH)
22ADMINS = () # pas de notifications courriel
23MANAGERS = ADMINS
24
25# Locales
26TIME_ZONE = 'America/Montreal'
27LANGUAGE_CODE = 'fr-ca'
28USE_I18N = True
29USE_L10N = True
30USE_TZ = True
31
32# URLs
33ROOT_URLCONF = '{{ project_name }}.urls'
34MEDIA_URL = '/media/'
35STATIC_URL = '/static/'
36
37INSTALLED_APPS = (
38 'django.contrib.auth',
39 'django.contrib.contenttypes',
40 'django.contrib.sessions',
41 'django.contrib.sites',
42 'django.contrib.messages',
43 'django.contrib.staticfiles',
44 'django.contrib.admin',
e5cceae7 45 '{{ project_name }}',
87a6b693
OL
46 'south',
47 'raven.contrib.django',
7adc7f71 48 'auf.django.pong',
87a6b693
OL
49)
50
51TEMPLATE_CONTEXT_PROCESSORS = DEFAULT_TEMPLATE_CONTEXT_PROCESSORS + (
52 'django.core.context_processors.static',
53 'django.core.context_processors.request',
54)
55
56MIDDLEWARE_CLASSES = DEFAULT_MIDDLEWARE_CLASSES + (
57 'auf.django.piwik.middleware.TrackMiddleware',
58)
59
60AUTHENTICATION_BACKENDS = (
61 'django.contrib.auth.backends.ModelBackend',
62)
63
64SOUTH_TESTS_MIGRATE = False
65
66LOGGING_FORMAT = \
67 '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s'
68LOGGING = {
69 'version': 1,
70 'disable_existing_loggers': False,
71 'filters': {
72 'require_debug_false': {
73 '()': 'django.utils.log.RequireDebugFalse'
74 }
75 },
76 'formatters': {
77 'verbose': {
78 'format': LOGGING_FORMAT
79 },
80 },
81 'handlers': {
82 'console': {
83 'level': 'DEBUG',
84 'class': 'logging.StreamHandler',
85 },
86 'sentry': {
87 'level': 'ERROR',
88 'filters': ['require_debug_false'],
89 'class': 'raven.contrib.django.handlers.SentryHandler',
90 },
91 },
92 'loggers': {
93 '': {
94 'handlers': ['console', 'sentry'],
95 'level': 'DEBUG',
96 'propagate': False,
97 },
98 }
99}
100
101try:
e5cceae7 102 from conf import * # NOQA
87a6b693
OL
103except ImportError:
104 pass