1 # Django settings for myslice project.
8 # compute ROOT from where this file is installed
9 # should fit every need including developers
10 # but you can redefine ROOT if that's not working for you
12 # get the directory where this file is
13 ROOT=os.path.dirname(__file__) or '.'
15 ROOT=os.path.realpath(ROOT+'/..')
23 raise Exception,"Cannot find ROOT for myslice"
27 # ('your_name', 'your_email@test.com'),
33 #DEFAULT_FROM_EMAIL = "root@theseus.ipv6.lip6.fr"
34 #EMAIL_HOST_PASSWORD = "mypassword"
36 EMAIL_HOST = "localhost"
42 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
43 'NAME': os.path.join(ROOT,'myslice.sqlite3'), # Or path to database file if using sqlite3.
44 'USER': '', # Not used with sqlite3.
45 'PASSWORD': '', # Not used with sqlite3.
46 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
47 'PORT': '', # Set to empty string for default. Not used with sqlite3.
51 # Local time zone for this installation. Choices can be found here:
52 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
53 # although not all choices may be available on all operating systems.
54 # In a Windows environment this must be set to your system time zone.
55 TIME_ZONE = 'America/Chicago'
57 # Language code for this installation. All choices can be found here:
58 # http://www.i18nguy.com/unicode/language-identifiers.html
59 LANGUAGE_CODE = 'en-us'
63 # If you set this to False, Django will make some optimizations so as not
64 # to load the internationalization machinery.
67 # If you set this to False, Django will not format dates, numbers and
68 # calendars according to the current locale.
71 # If you set this to False, Django will not use timezone-aware datetimes.
74 # Absolute filesystem path to the directory that will hold user-uploaded files.
75 # Example: "/home/media/media.lawrence.com/media/"
78 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
80 # Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
83 # Absolute path to the directory static files should be collected to.
84 # Don't put anything in this directory yourself; store your static files
85 # in apps' "static/" subdirectories and in STATICFILES_DIRS.
86 # Example: "/home/media/media.lawrence.com/static/"
87 STATIC_ROOT = os.path.join(ROOT,'django-static')
89 # URL prefix for static files.
90 # Example: "http://media.lawrence.com/static/"
91 # thierry STATIC_URL = '/all-static/'
92 STATIC_URL = '/static/'
94 # Additional locations of static files
96 # Put strings here, like "/home/html/static" or "C:/www/django/static".
97 # Always use forward slashes, even on Windows.
98 # Don't forget to use absolute paths, not relative paths.
99 # thierry os.path.join(ROOT,'all-static'),
100 ('js', os.path.join(ROOT,'manifold/js')),
101 ('css', os.path.join(ROOT,'manifold/css')),
102 ('js', os.path.join(ROOT,'unfold/js')),
103 ('css', os.path.join(ROOT,'unfold/css')),
104 ('js', os.path.join(ROOT,'auth/js')),
105 ('css', os.path.join(ROOT,'auth/css')),
106 ('img', os.path.join(ROOT,'auth/img')),
107 ('css', os.path.join(ROOT,'views/css')),
108 ('img', os.path.join(ROOT,'views/img')),
111 # Needed by PluginFinder
112 PLUGIN_DIR = os.path.join(ROOT,'plugins')
114 THIRDPARTY_DIR = os.path.join(ROOT, 'third-party')
116 # List of finder classes that know how to find static files in
118 STATICFILES_FINDERS = (
119 'django.contrib.staticfiles.finders.FileSystemFinder',
120 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
121 'unfold.static.PluginFinder',
122 'unfold.static.ThirdPartyFinder',
123 # 'django.contrib.staticfiles.finders.DefaultStorageFinder',
126 #TEMPLATE_CONTEXT_PROCESSORS = (
127 # 'django.contrib.auth.context_processors.auth',
128 # 'django.core.context_processors.debug',
129 # 'django.core.context_processors.i18n',
130 # 'django.core.context_processors.media',
131 # 'django.core.context_processors.static',
132 # 'django.core.context_processors.request',
133 # 'django.contrib.messages.context_processors.messages',
136 # Make this unique, and don't share it with anybody.
137 SECRET_KEY = 't%n(3h)&r^n8(+8)(sp29t^$c2#t(m3)e2!02l8w1#36tl#t27'
139 # List of callables that know how to import templates from various sources.
141 'django.template.loaders.filesystem.Loader',
142 'django.template.loaders.app_directories.Loader',
143 # 'django.template.loaders.eggs.Loader',
146 MIDDLEWARE_CLASSES = (
147 'django.middleware.common.CommonMiddleware',
148 'django.contrib.sessions.middleware.SessionMiddleware',
149 'django.middleware.csrf.CsrfViewMiddleware',
150 'django.contrib.auth.middleware.AuthenticationMiddleware',
151 'django.contrib.messages.middleware.MessageMiddleware',
152 # Uncomment the next line for simple clickjacking protection:
153 # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
156 ROOT_URLCONF = 'myslice.urls'
158 # Python dotted path to the WSGI application used by Django's runserver.
159 WSGI_APPLICATION = 'myslice.wsgi.application'
162 # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
163 # Always use forward slashes, even on Windows.
164 # Don't forget to use absolute paths, not relative paths.
165 os.path.join(ROOT,"all-templates"),
169 'django.contrib.auth',
170 'django.contrib.contenttypes',
171 'django.contrib.sessions',
172 'django.contrib.sites',
173 'django.contrib.messages',
174 'django.contrib.staticfiles',
175 # handling the {% insert %} and {% container %} tags
176 # see details in devel/django-insert-above-1.0-4
181 'auth', 'manifold', 'unfold',
184 # views - more or less stable
187 'south', # managing database migrations
188 # Uncomment the next line to enable the admin:
189 # 'django.contrib.admin',
190 # Uncomment the next line to enable admin documentation:
191 # 'django.contrib.admindocs',
194 # DEPRECATED # 'django.contrib.formtools',
195 # DEPRECATED ## 'crispy_forms',
197 # DEPRECATED # # User registration
198 # DEPRECATED # 'django.contrib.auth',
199 # DEPRECATED # 'django.contrib.sites',
200 # DEPRECATED # 'registration',
203 ACCOUNT_ACTIVATION_DAYS = 7 # One-week activation window; you may, of course, use a different value.
205 # A sample logging configuration. The only tangible logging
206 # performed by this configuration is to send an email to
207 # the site admins on every HTTP 500 error when DEBUG=False.
208 # See http://docs.djangoproject.com/en/dev/topics/logging for
209 # more details on how to customize your logging configuration.
212 'disable_existing_loggers': False,
214 'require_debug_false': {
215 '()': 'django.utils.log.RequireDebugFalse'
221 'filters': ['require_debug_false'],
222 'class': 'django.utils.log.AdminEmailHandler',
227 'handlers': ['mail_admins'],
234 AUTHENTICATION_BACKENDS = ( 'auth.backend.MyCustomBackend', 'auth.manifoldbackend.ManifoldBackend', )
236 ### the view to redirect malformed (i.e. with a wrong CSRF) incoming requests
237 # without this setting django will return a 403 forbidden error, which is fine
238 # if you need to see the error message then use this setting
239 CSRF_FAILURE_VIEW = 'manifold.manifoldproxy.csrf_failure'
241 #################### for insert_above
242 #IA_JS_FORMAT = "<script type='text/javascript' src='{URL}' />"
243 # put stuff under static/
244 # IA_MEDIA_PREFIX = '/code/'