source: src/django_gheat/settings.py@ 9376

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

Rename the kind-of-meaningless-named django app website to a more meaningfull name wlheatmap

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