setup
[auf_framonde.git] / project / settings.py
... / ...
CommitLineData
1# -*- encoding: utf-8 -*-
2
3import os
4import socket
5from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS as \
6 DEFAULT_TEMPLATE_CONTEXT_PROCESSORS
7from django.conf.global_settings import STATICFILES_FINDERS as \
8 DEFAULT_STATICFILES_FINDERS
9from django.conf.global_settings import MIDDLEWARE_CLASSES as \
10 DEFAULT_MIDDLEWARE_CLASSES
11from django.conf.global_settings import AUTHENTICATION_BACKENDS as \
12 DEFAULT_AUTHENTICATION_BACKENDS
13from django.conf.global_settings import TEMPLATE_LOADERS as \
14 DEFAULT_TEMPLATE_LOADERS
15
16# Rapports d'erreurs
17SERVER_EMAIL = 'ne-pas-repondre@auf.org'
18EMAIL_SUBJECT_PREFIX = '[Framonde - %s] ' % socket.gethostname()
19EMAIL_HOST = 'localhost'
20EMAIL_PORT = 587
21EMAIL_USE_TLS = True
22ADMINS = ()
23
24MANAGERS = ADMINS
25
26TIME_ZONE = 'America/Montreal'
27LANGUAGE_CODE = 'fr-ca'
28
29SITE_ID = '1'
30
31CMS_LANGUAGES = (
32 ('fr', ('French')),
33)
34
35PROJECT_ROOT = os.path.dirname(__file__)
36SITE_ROOT = os.path.dirname(PROJECT_ROOT)
37
38MEDIA_ROOT = os.path.join(SITE_ROOT, 'media')
39MEDIA_URL = '../media/'
40
41STATIC_ROOT = os.path.join(SITE_ROOT, 'sitestatic')
42STATIC_URL = '/static/'
43STATICFILES_DIRS = (
44 os.path.join(PROJECT_ROOT, 'static'),
45)
46STATICFILES_FINDERS = DEFAULT_STATICFILES_FINDERS
47
48ROOT_URLCONF = 'project.urls'
49
50INSTALLED_APPS = (
51 'filebrowser',
52 'admin_tools',
53 'admin_tools.theming',
54 'admin_tools.menu',
55 'admin_tools.dashboard',
56 'django.contrib.auth',
57 'django.contrib.contenttypes',
58 'django.contrib.sessions',
59 'django.contrib.sites',
60 'django.contrib.messages',
61 'django.contrib.staticfiles',
62 'django.contrib.admin',
63 'south',
64 'raven.contrib.django',
65
66 # django-cms
67 'cms',
68 'mptt',
69 'menus',
70 'south',
71 'sekizai',
72 'pagination',
73 'tinymce',
74 'framonde',
75 'contact',
76
77 # django-cms plugins
78 'cms.plugins.text',
79 #'cms.plugins.googlemap',
80 #'cms.plugins.picture',
81)
82
83TEMPLATE_CONTEXT_PROCESSORS = DEFAULT_TEMPLATE_CONTEXT_PROCESSORS + (
84 'django.core.context_processors.static',
85 'django.core.context_processors.request',
86 'cms.context_processors.media',
87 'sekizai.context_processors.sekizai',
88 'framonde.context_processors.abonnement',
89 'framonde.context_processors.archives',
90)
91
92TEMPLATE_LOADERS = DEFAULT_TEMPLATE_LOADERS
93
94MIDDLEWARE_CLASSES = DEFAULT_MIDDLEWARE_CLASSES + (
95 'auf.django.piwik.middleware.TrackMiddleware',
96 'cms.middleware.page.CurrentPageMiddleware',
97 'cms.middleware.user.CurrentUserMiddleware',
98 'cms.middleware.toolbar.ToolbarMiddleware',
99 'pagination.middleware.PaginationMiddleware',
100 'auf.django.piwik.middleware.TrackMiddleware',
101)
102
103AUTHENTICATION_BACKENDS = DEFAULT_AUTHENTICATION_BACKENDS
104
105TEMPLATE_DIRS = (
106 os.path.join(os.path.dirname(__file__), "templates"),
107)
108
109CMS_TEMPLATES = (
110 ('page.html', ('Page Texte')),
111)
112
113SOUTH_TESTS_MIGRATE = False
114
115LOGGING = {
116 'version': 1,
117 'disable_existing_loggers': True,
118 'root': {
119 'level': 'WARNING',
120 'handlers': ['sentry'],
121 },
122 'formatters': {
123 'verbose': {
124 'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s'
125 },
126 },
127 'handlers': {
128 'sentry': {
129 'level': 'WARNING',
130 'class': 'raven.contrib.django.handlers.SentryHandler',
131 },
132 'console': {
133 'level': 'DEBUG',
134 'class': 'logging.StreamHandler',
135 'formatter': 'verbose'
136 }
137 },
138 'loggers': {
139 'django.db.backends': {
140 'level': 'ERROR',
141 'handlers': ['console'],
142 'propagate': False,
143 },
144 'raven': {
145 'level': 'DEBUG',
146 'handlers': ['console'],
147 'propagate': False,
148 },
149 'sentry.errors': {
150 'level': 'DEBUG',
151 'handlers': ['console'],
152 'propagate': False,
153 },
154 },
155}
156
157from conf import *
158
159TINYMCE_DEFAULT_CONFIG = {
160 'theme': "advanced",
161 'theme_advanced_buttons1' : "formatselect,|,bold,italic,underline,|,bullist,numlist,|,undo,redo,|,link,unlink,image,|,backcolor,|removeformat,visualaid,code,",
162 'theme_advanced_buttons2' : "",
163 'theme_advanced_buttons3' : "",
164 'theme_advanced_statusbar_location' : "bottom",
165 'theme_advanced_toolbar_align' : "left",
166 'width' : "800",
167 'height' : "200",
168 'theme_advanced_resizing' : "true",
169 'custom_undo_redo_levels': 10,
170 'theme_advanced_toolbar_location' : 'top',
171}