boostrap 1
[ifgu.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
8 # Rapports d'erreurs
9 # Host for sending e-mail.
10 EMAIL_HOST = 'smtp-sortant.ca.auf.org'
11 EMAIL_PORT = 587
12 EMAIL_HOST_USER = 'marc.nachin@auf.org'
13 EMAIL_HOST_PASSWORD = 'coucou26'
14 EMAIL_USE_TLS = True
15 SERVER_EMAIL = 'ne-pas-repondre@auf.org'
16 EMAIL_SUBJECT_PREFIX = '[IFGU - %s] ' % socket.gethostname()
17 ADMINS = (
18 ('Équipe ARI-SI', 'developpeurs@ca.auf.org'),
19 )
20
21 MANAGERS = ADMINS
22
23 TIME_ZONE = 'America/Montreal'
24
25 LANGUAGE_CODE = 'fr-ca'
26 gettext = lambda x: x
27 CMS_LANGUAGES = (
28 ('fr', gettext('French')),
29 )
30
31 PROJECT_ROOT = os.path.dirname(__file__)
32 SITE_ROOT = os.path.dirname(PROJECT_ROOT)
33
34 MEDIA_ROOT = os.path.join(PROJECT_ROOT, 'media')
35 MEDIA_URL = '/media/'
36
37 STATIC_ROOT = os.path.join(SITE_ROOT, 'sitestatic')
38 STATIC_URL = '/static/'
39 STATICFILES_DIRS = (
40 os.path.join(PROJECT_ROOT, 'static'),
41 )
42
43 ROOT_URLCONF = 'project.urls'
44
45 INSTALLED_APPS = (
46 'filebrowser',
47 'admin_tools',
48 'admin_tools.theming',
49 'admin_tools.menu',
50 'admin_tools.dashboard',
51 'django.contrib.auth',
52 'django.contrib.contenttypes',
53 'django.contrib.sessions',
54 'django.contrib.admin',
55 'django.contrib.staticfiles',
56 'django.contrib.sites',
57 'django.contrib.sitemaps',
58 'south',
59 'diaporama',
60 'article',
61 'gestion_de_documents',
62 'newsletter',
63 'raven.contrib.django',
64
65 # django-cms
66 'cms',
67 'mptt',
68 'menus',
69 'south',
70 'sekizai',
71 'pagination',
72 'tinymce',
73
74 # django-cms plugins
75 'cms.plugins.text',
76 'cms.plugins.picture',
77
78 'auf.django.pong',
79 )
80
81 MIDDLEWARE_CLASSES = (
82 'django.middleware.common.CommonMiddleware',
83 'django.contrib.sessions.middleware.SessionMiddleware',
84 'django.middleware.csrf.CsrfViewMiddleware',
85 'django.contrib.auth.middleware.AuthenticationMiddleware',
86 'django.contrib.messages.middleware.MessageMiddleware',
87 'cms.middleware.page.CurrentPageMiddleware',
88 'cms.middleware.user.CurrentUserMiddleware',
89 'cms.middleware.toolbar.ToolbarMiddleware',
90 'pagination.middleware.PaginationMiddleware',
91 'auf.django.piwik.middleware.TrackMiddleware',
92 )
93
94 TEMPLATE_CONTEXT_PROCESSORS = DEFAULT_TEMPLATE_CONTEXT_PROCESSORS + (
95 'django.core.context_processors.static',
96 'django.core.context_processors.request',
97 'cms.context_processors.media',
98 'sekizai.context_processors.sekizai',
99 'diaporama.context_processors.list_slider',
100 'article.context_processors.list_actu',
101 'newsletter.context_processors.abonnement',
102 )
103
104
105 TEMPLATE_DIRS = (
106 os.path.join(os.path.dirname(__file__), "templates"),
107 )
108
109 SOUTH_TESTS_MIGRATE = False
110
111 ADMIN_TOOLS_INDEX_DASHBOARD = 'project.dashboard.CustomIndexDashboard'
112
113 CMS_TEMPLATES = (
114 ('accueil.html', gettext('Page Accueil')),
115 ('page.html', gettext('Page Texte')),
116 )
117
118 from conf import *
119
120 TINYMCE_DEFAULT_CONFIG = {
121 'theme': "advanced",
122 'theme_advanced_buttons1' : "formatselect,|,bold,italic,underline,|,bullist,numlist,|,undo,redo,|,link,unlink,image,|,backcolor,|removeformat,visualaid,code,",
123 'theme_advanced_buttons2' : "",
124 'theme_advanced_buttons3' : "",
125 'theme_advanced_statusbar_location' : "bottom",
126 'theme_advanced_toolbar_align' : "left",
127 'width' : "800",
128 'height' : "200",
129 'theme_advanced_resizing' : "true",
130 'custom_undo_redo_levels': 10,
131 'theme_advanced_toolbar_location' : 'top',
132 }