source: src/django_gheat/settings.py@ 9545

Last change on this file since 9545 was 9545, checked in by rick, 13 years ago

Make sure admin prefix works as expected.

File size: 4.6 KB
Line 
1# Django settings for persisted project.
2
3import os
4PROJECT_HOME = os.path.abspath(os.path.dirname(__file__))
5
6DJANGO_PREFIX = '/d'
7DJANGO_BALANCERS = OSM_PROXY_BALANCERS = ['a','b','c','d','e','f']
8OSM_PROXY_CDN_DOMAINS = [d + '.osmproxy.wirelessleiden.nl' for d in DJANGO_BALANCERS]
9DJANGO_CDN_DOMAINS = [d + '.maps.wirelessleiden.nl' for d in DJANGO_BALANCERS]
10
11DEBUG = os.path.exists(PROJECT_HOME + '/enable-debug')
12TEMPLATE_DEBUG = DEBUG
13
14# Required for Etags Caching Implementation
15USE_ETAGS = True
16
17# Please mind(!), enabling will cause it to send emails when DEBUG=False
18ADMINS = (
19# ('Rick van der Zwet', 'info@rickvanderzwet.nl'),
20)
21
22MANAGERS = ADMINS
23
24DATABASES = {
25 'default': {
26 'ENGINE': 'django.db.backends.mysql',
27 'NAME': 'project_heatmap',
28 'USER': 'root',
29 'PASSWORD': '',
30 'HOST': 'localhost',
31 'PORT': '3306',
32 }
33}
34
35CACHES = {
36 'default': {
37 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
38 'LOCATION': '127.0.0.1:11211',
39 'TIMEOUT': 3600 * 24 * 7,
40 'OPTIONS': {
41 'MAX_ENTRIES': 100000
42 }
43 },
44}
45
46
47# Local time zone for this installation. Choices can be found here:
48# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
49# although not all choices may be available on all operating systems.
50# If running in a Windows environment this must be set to the same as your
51# system time zone.
52TIME_ZONE = 'America/Chicago'
53
54# Language code for this installation. All choices can be found here:
55# http://www.i18nguy.com/unicode/language-identifiers.html
56LANGUAGE_CODE = 'en-us'
57
58SITE_ID = 1
59
60# If you set this to False, Django will make some optimizations so as not
61# to load the internationalization machinery.
62USE_I18N = True
63
64# Absolute path to the directory that holds media.
65# Example: "/home/media/media.lawrence.com/"
66MEDIA_ROOT = os.path.join(PROJECT_HOME,'sitemedia')
67
68
69# URL that handles the media served from MEDIA_ROOT. Make sure to use a
70# trailing slash if there is a path component (optional in other cases).
71# Examples: "http://media.lawrence.com", "http://example.com/media/"
72MEDIA_URL = DJANGO_PREFIX + '/media/'
73
74# Absolute path to the directory static files should be collected to.
75# Don't put anything in this directory yourself; store your static files
76# in apps' "static/" subdirectories and in STATICFILES_DIRS.
77# Example: "/home/media/media.lawrence.com/static/"
78STATIC_ROOT = os.path.join(PROJECT_HOME,'sitestatic')
79
80
81# URL prefix for static files.
82# Example: "http://media.lawrence.com/static/"
83STATIC_URL = DJANGO_PREFIX + '/static/'
84
85# URL prefix for admin static files -- CSS, JavaScript and images.
86# Make sure to use a trailing slash.
87# Examples: "http://foo.com/static/admin/", "/static/admin/".
88ADMIN_MEDIA_PREFIX = '/d/static/admin/'
89
90# Additional locations of static files
91STATICFILES_DIRS = (
92 # PROJECT_HOME + '/static',
93 # Put strings here, like "/home/html/static" or "C:/www/django/static".
94 # Always use forward slashes, even on Windows.
95 # Don't forget to use absolute paths, not relative paths.
96)
97
98# List of finder classes that know how to find static files in
99# various locations.
100STATICFILES_FINDERS = (
101 'django.contrib.staticfiles.finders.FileSystemFinder',
102 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
103# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
104)
105
106# Make this unique, and don't share it with anybody.
107SECRET_KEY = '=wg@x19kr@26sibiaynb9ax5ddp1&yu^+$3n++^_lz1ms80syb'
108
109# List of callables that know how to import templates from various sources.
110TEMPLATE_LOADERS = (
111 'django.template.loaders.filesystem.Loader',
112 'django.template.loaders.app_directories.Loader',
113 'django.template.loaders.eggs.Loader',
114)
115
116MIDDLEWARE_CLASSES = (
117 'django.middleware.cache.UpdateCacheMiddleware',
118 'django.middleware.common.CommonMiddleware',
119 'django.middleware.cache.FetchFromCacheMiddleware',
120 'django.middleware.http.ConditionalGetMiddleware',
121 'django.contrib.sessions.middleware.SessionMiddleware',
122 'django.contrib.auth.middleware.AuthenticationMiddleware',
123)
124
125ROOT_URLCONF = 'urls'
126
127TEMPLATE_DIRS = (
128 # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
129 # Always use forward slashes, even on Windows.
130 # Don't forget to use absolute paths, not relative paths.
131 os.path.join(PROJECT_HOME, 'templates'),
132)
133
134INSTALLED_APPS = (
135 'django.contrib.admin',
136 'django.contrib.auth',
137 'django.contrib.contenttypes',
138 'django.contrib.sessions',
139 'django.contrib.sites',
140 'django.contrib.staticfiles',
141 'django_extensions',
142 'gheat',
143 'wlheatmap',
144)
Note: See TracBrowser for help on using the repository browser.