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"
46 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
47 'NAME': os.path.join(ROOT,'myslice.sqlite3'), # Or path to database file if using sqlite3.
48 'USER': '', # Not used with sqlite3.
49 'PASSWORD': '', # Not used with sqlite3.
50 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
51 'PORT': '', # Set to empty string for default. Not used with sqlite3.
55 # Local time zone for this installation. Choices can be found here:
56 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
57 # although not all choices may be available on all operating systems.
58 # In a Windows environment this must be set to your system time zone.
59 TIME_ZONE = 'America/Chicago'
61 # Language code for this installation. All choices can be found here:
62 # http://www.i18nguy.com/unicode/language-identifiers.html
63 LANGUAGE_CODE = 'en-us'
67 # If you set this to False, Django will make some optimizations so as not
68 # to load the internationalization machinery.
71 # If you set this to False, Django will not format dates, numbers and
72 # calendars according to the current locale.
75 # If you set this to False, Django will not use timezone-aware datetimes.
78 # Absolute filesystem path to the directory that will hold user-uploaded files.
79 # Example: "/home/media/media.lawrence.com/media/"
82 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
84 # Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
87 # Absolute path to the directory static files should be collected to.
88 # Don't put anything in this directory yourself; store your static files
89 # in apps' "static/" subdirectories and in STATICFILES_DIRS.
90 # Example: "/home/media/media.lawrence.com/static/"
91 STATIC_ROOT = os.path.join(ROOT,'django-static')
93 # URL prefix for static files.
94 # Example: "http://media.lawrence.com/static/"
95 STATIC_URL = '/all-static/'
97 # Additional locations of static files
99 # Put strings here, like "/home/html/static" or "C:/www/django/static".
100 # Always use forward slashes, even on Windows.
101 # Don't forget to use absolute paths, not relative paths.
102 os.path.join(ROOT,'all-static'),
105 # List of finder classes that know how to find static files in
107 STATICFILES_FINDERS = (
108 'django.contrib.staticfiles.finders.FileSystemFinder',
109 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
110 # 'django.contrib.staticfiles.finders.DefaultStorageFinder',
113 # Make this unique, and don't share it with anybody.
114 SECRET_KEY = 't%n(3h)&r^n8(+8)(sp29t^$c2#t(m3)e2!02l8w1#36tl#t27'
116 # List of callables that know how to import templates from various sources.
118 'django.template.loaders.filesystem.Loader',
119 'django.template.loaders.app_directories.Loader',
120 # 'django.template.loaders.eggs.Loader',
123 MIDDLEWARE_CLASSES = (
124 'django.middleware.common.CommonMiddleware',
125 'django.contrib.sessions.middleware.SessionMiddleware',
126 'django.middleware.csrf.CsrfViewMiddleware',
127 'django.contrib.auth.middleware.AuthenticationMiddleware',
128 'django.contrib.messages.middleware.MessageMiddleware',
129 # Uncomment the next line for simple clickjacking protection:
130 # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
133 ROOT_URLCONF = 'myslice.urls'
135 # Python dotted path to the WSGI application used by Django's runserver.
136 WSGI_APPLICATION = 'myslice.wsgi.application'
139 # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
140 # Always use forward slashes, even on Windows.
141 # Don't forget to use absolute paths, not relative paths.
142 os.path.join(ROOT,"all-templates"),
146 'django.contrib.auth',
147 'django.contrib.contenttypes',
148 'django.contrib.sessions',
149 'django.contrib.sites',
150 'django.contrib.messages',
151 'django.contrib.staticfiles',
152 # handling the {% insert %} and {% container %} tags
153 # see details in devel/django-insert-above-1.0-4
158 'auth', 'manifold', 'unfold',
161 # views - more or less stable
164 # Uncomment the next line to enable the admin:
165 # 'django.contrib.admin',
166 # Uncomment the next line to enable admin documentation:
167 # 'django.contrib.admindocs',
169 # DEPRECATED # 'django.contrib.formtools',
170 # DEPRECATED ## 'crispy_forms',
172 # DEPRECATED # # User registration
173 # DEPRECATED # 'django.contrib.auth',
174 # DEPRECATED # 'django.contrib.sites',
175 # DEPRECATED # 'registration',
178 ACCOUNT_ACTIVATION_DAYS = 7 # One-week activation window; you may, of course, use a different value.
180 # A sample logging configuration. The only tangible logging
181 # performed by this configuration is to send an email to
182 # the site admins on every HTTP 500 error when DEBUG=False.
183 # See http://docs.djangoproject.com/en/dev/topics/logging for
184 # more details on how to customize your logging configuration.
187 'disable_existing_loggers': False,
189 'require_debug_false': {
190 '()': 'django.utils.log.RequireDebugFalse'
196 'filters': ['require_debug_false'],
197 'class': 'django.utils.log.AdminEmailHandler',
202 'handlers': ['mail_admins'],
209 AUTHENTICATION_BACKENDS = ( 'auth.backend.MyCustomBackend', 'auth.manifoldbackend.ManifoldBackend', )
211 ### the view to redirect malformed (i.e. with a wrong CSRF) incoming requests
212 # without this setting django will return a 403 forbidden error, which is fine
213 # if you need to see the error message then use this setting
214 CSRF_FAILURE_VIEW = 'manifold.manifoldproxy.csrf_failure'
216 #################### for insert_above
217 #IA_JS_FORMAT = "<script type='text/javascript' src='{URL}' />"
218 # put stuff under static/
219 # IA_MEDIA_PREFIX = '/code/'