setup2
[auf_framonde.git] / project / settings.py
1 # -*- encoding: utf-8 -*-
2
3 import os
4 import socket
5 from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS as \
6 DEFAULT_TEMPLATE_CONTEXT_PROCESSORS
7 from django.conf.global_settings import STATICFILES_FINDERS as \
8 DEFAULT_STATICFILES_FINDERS
9 from django.conf.global_settings import MIDDLEWARE_CLASSES as \
10 DEFAULT_MIDDLEWARE_CLASSES
11 from django.conf.global_settings import AUTHENTICATION_BACKENDS as \
12 DEFAULT_AUTHENTICATION_BACKENDS
13 from django.conf.global_settings import TEMPLATE_LOADERS as \
14 DEFAULT_TEMPLATE_LOADERS
15
16 # Rapports d'erreurs
17 SERVER_EMAIL = 'ne-pas-repondre@auf.org'
18 EMAIL_SUBJECT_PREFIX = '[Framonde - %s] ' % socket.gethostname()
19 EMAIL_HOST = 'localhost'
20 EMAIL_PORT = 587
21 EMAIL_USE_TLS = True
22 ADMINS = ()
23
24 MANAGERS = ADMINS
25
26 TIME_ZONE = 'America/Montreal'
27 LANGUAGE_CODE = 'fr-ca'
28
29 SITE_ID = '1'
30
31 CMS_LANGUAGES = (
32 ('fr', ('French')),
33 )
34
35 PROJECT_ROOT = os.path.dirname(__file__)
36 SITE_ROOT = os.path.dirname(PROJECT_ROOT)
37
38 MEDIA_ROOT = os.path.join(SITE_ROOT, 'media')
39 MEDIA_URL = '/media/'
40
41 STATIC_ROOT = os.path.join(SITE_ROOT, 'sitestatic')
42 STATIC_URL = '/static/'
43 STATICFILES_DIRS = (
44 os.path.join(PROJECT_ROOT, 'static'),
45 )
46 STATICFILES_FINDERS = DEFAULT_STATICFILES_FINDERS
47
48 ROOT_URLCONF = 'project.urls'
49
50 INSTALLED_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
83 TEMPLATE_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
92 TEMPLATE_LOADERS = DEFAULT_TEMPLATE_LOADERS
93
94 MIDDLEWARE_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
103 AUTHENTICATION_BACKENDS = DEFAULT_AUTHENTICATION_BACKENDS
104
105 TEMPLATE_DIRS = (
106 os.path.join(os.path.dirname(__file__), "templates"),
107 )
108
109 CMS_TEMPLATES = (
110 ('page.html', ('Page Texte')),
111 )
112
113 SOUTH_TESTS_MIGRATE = False
114
115 LOGGING = {
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
157 from conf import *
158
159 TINYMCE_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 }