source: src/django_gheat/settings.py@ 9395

Last change on this file since 9395 was 9395, checked in by rick, 14 years ago

We might as well want to store the results in the Django instance as well. Save some other hacks.

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