1 # -*- coding: utf-8 -*-
2 # Django settings for myslice project.
6 PROJECT_PATH = os.path.abspath(os.path.dirname(__file__))
11 TEMPLATE_DEBUG = DEBUG
13 # compute ROOT from where this file is installed
14 # should fit every need including developers
15 # but you can redefine ROOT if that's not working for you
17 # get the directory where this file is
18 ROOT=os.path.dirname(__file__) or '.'
20 ROOT=os.path.realpath(ROOT+'/..')
28 raise Exception,"Cannot find ROOT for myslice"
32 ('admin', 'your_email@test.com'),
38 #DEFAULT_FROM_EMAIL = "root@theseus.ipv6.lip6.fr"
39 #EMAIL_HOST_PASSWORD = "mypassword"
41 EMAIL_HOST = "localhost"
47 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
48 'NAME': os.path.join(ROOT,'myslice.sqlite3'), # Or path to database file if using sqlite3.
49 'USER': '', # Not used with sqlite3.
50 'PASSWORD': '', # Not used with sqlite3.
51 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
52 'PORT': '', # Set to empty string for default. Not used with sqlite3.
56 # Local time zone for this installation. Choices can be found here:
57 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
58 # although not all choices may be available on all operating systems.
59 # In a Windows environment this must be set to your system time zone.
60 TIME_ZONE = 'America/Chicago'
62 # Language code for this installation. All choices can be found here:
63 # http://www.i18nguy.com/unicode/language-identifiers.html
64 LANGUAGE_CODE = 'en-us'
68 # If you set this to False, Django will make some optimizations so as not
69 # to load the internationalization machinery.
72 # If you set this to False, Django will not format dates, numbers and
73 # calendars according to the current locale.
76 # If you set this to False, Django will not use timezone-aware datetimes.
79 # Absolute filesystem path to the directory that will hold user-uploaded files.
80 # Example: "/home/media/media.lawrence.com/media/"
83 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
85 # Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
88 # Absolute path to the directory static files should be collected to.
89 # Don't put anything in this directory yourself; store your static files
90 # in apps' "static/" subdirectories and in STATICFILES_DIRS.
91 # Example: "/home/media/media.lawrence.com/static/"
92 STATIC_ROOT = os.path.join(ROOT,'django-static')
94 # URL prefix for static files.
95 # Example: "http://media.lawrence.com/static/"
96 STATIC_URL = '/all-static/'
98 # Additional locations of static files
100 # Put strings here, like "/home/html/static" or "C:/www/django/static".
101 # Always use forward slashes, even on Windows.
102 # Don't forget to use absolute paths, not relative paths.
103 os.path.join(ROOT,'all-static'),
106 # List of finder classes that know how to find static files in
108 STATICFILES_FINDERS = (
109 'django.contrib.staticfiles.finders.FileSystemFinder',
110 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
111 # 'django.contrib.staticfiles.finders.DefaultStorageFinder',
114 # Make this unique, and don't share it with anybody.
115 SECRET_KEY = 't%n(3h)&r^n8(+8)(sp29t^$c2#t(m3)e2!02l8w1#36tl#t27'
117 # List of callables that know how to import templates from various sources.
119 'django.template.loaders.filesystem.Loader',
120 'django.template.loaders.app_directories.Loader',
121 # 'django.template.loaders.eggs.Loader',
124 MIDDLEWARE_CLASSES = (
125 'django.middleware.common.CommonMiddleware',
126 'django.contrib.sessions.middleware.SessionMiddleware',
127 'django.middleware.csrf.CsrfViewMiddleware',
128 'django.contrib.auth.middleware.AuthenticationMiddleware',
129 'django.contrib.messages.middleware.MessageMiddleware',
130 # Uncomment the next line for simple clickjacking protection:
131 # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
133 'django.middleware.locale.LocaleMiddleware',
134 'django.middleware.doc.XViewMiddleware',
137 'cms.middleware.page.CurrentPageMiddleware',
138 'cms.middleware.user.CurrentUserMiddleware',
139 'cms.middleware.toolbar.ToolbarMiddleware',
140 'cms.middleware.language.LanguageCookieMiddleware',
144 TEMPLATE_CONTEXT_PROCESSORS = (
145 'django.contrib.auth.context_processors.auth',
146 'django.core.context_processors.i18n',
147 'django.core.context_processors.request',
148 'django.core.context_processors.media',
149 'django.core.context_processors.static',
150 'cms.context_processors.media',
151 'sekizai.context_processors.sekizai',
155 ROOT_URLCONF = 'myslice.urls'
157 # Python dotted path to the WSGI application used by Django's runserver.
158 WSGI_APPLICATION = 'myslice.wsgi.application'
161 # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
162 # Always use forward slashes, even on Windows.
163 # Don't forget to use absolute paths, not relative paths.
164 os.path.join(ROOT,"all-templates"),
167 os.path.join(PROJECT_PATH, "templates"),
172 ('template_1.html', 'Template One'),
173 ('template_2.html', 'Template Two'),
181 'django.contrib.auth',
182 'django.contrib.contenttypes',
183 'django.contrib.sessions',
184 'django.contrib.sites',
185 'django.contrib.messages',
186 'django.contrib.staticfiles',
187 # handling the {% insert %} and {% container %} tags
188 # see details in devel/django-insert-above-1.0-4
193 'auth', 'manifold', 'unfold',
196 # views - more or less stable
199 # Uncomment the next line to enable the admin:
200 'django.contrib.admin',
201 # Uncomment the next line to enable admin documentation:
202 # 'django.contrib.admindocs',
204 # DEPRECATED # 'django.contrib.formtools',
205 # DEPRECATED ## 'crispy_forms',
207 # DEPRECATED # # User registration
208 # DEPRECATED # 'django.contrib.auth',
209 # DEPRECATED # 'django.contrib.sites',
210 # DEPRECATED # 'registration',
213 'cms', # django CMS itself
214 'mptt', # utilities for implementing a modified pre-order traversal tree
215 'menus', # helper for model independent hierarchical website navigation
216 'south', # intelligent schema and data migrations
217 'sekizai', # for javascript and css management
220 'cms.plugins.googlemap',
222 'cms.plugins.snippet',
224 'cms.plugins.twitter',
227 'cms.plugins.picture',
228 'cms.plugins.teaser',
232 #'cmsplugin_filer_file',
233 #'cmsplugin_filer_folder',
234 #'cmsplugin_filer_image',
235 #'cmsplugin_filer_teaser',
236 #'cmsplugin_filer_video',
238 # Versioning of content
242 ACCOUNT_ACTIVATION_DAYS = 7 # One-week activation window; you may, of course, use a different value.
244 # A sample logging configuration. The only tangible logging
245 # performed by this configuration is to send an email to
246 # the site admins on every HTTP 500 error when DEBUG=False.
247 # See http://docs.djangoproject.com/en/dev/topics/logging for
248 # more details on how to customize your logging configuration.
251 'disable_existing_loggers': False,
253 'require_debug_false': {
254 '()': 'django.utils.log.RequireDebugFalse'
260 'filters': ['require_debug_false'],
261 'class': 'django.utils.log.AdminEmailHandler',
266 'handlers': ['mail_admins'],
273 AUTHENTICATION_BACKENDS = (
274 'auth.backend.MyCustomBackend',
275 'auth.manifoldbackend.ManifoldBackend',
276 # This is required to login as an admin
277 'django.contrib.auth.backends.ModelBackend'
280 ### the view to redirect malformed (i.e. with a wrong CSRF) incoming requests
281 # without this setting django will return a 403 forbidden error, which is fine
282 # if you need to see the error message then use this setting
283 CSRF_FAILURE_VIEW = 'manifold.manifoldproxy.csrf_failure'
285 #################### for insert_above
286 #IA_JS_FORMAT = "<script type='text/javascript' src='{URL}' />"
287 # put stuff under static/
288 # IA_MEDIA_PREFIX = '/code/'