source: src/django_gheat/settings.py@ 9389

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

Use Django 1.3 style loaders

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