1 | # Django settings for persisted project.
|
---|
2 |
|
---|
3 | import os
|
---|
4 | PROJECT_HOME = os.path.abspath(os.path.dirname(__file__))
|
---|
5 |
|
---|
6 | DJANGO_PREFIX = '/d'
|
---|
7 | DJANGO_BALANCERS = OSM_PROXY_BALANCERS = ['a','b','c','d','e','f']
|
---|
8 | OSM_PROXY_CDN_DOMAINS = [d + '.osmproxy.wirelessleiden.nl' for d in DJANGO_BALANCERS]
|
---|
9 | DJANGO_CDN_DOMAINS = [d + '.maps.wirelessleiden.nl' for d in DJANGO_BALANCERS]
|
---|
10 |
|
---|
11 | DEBUG = os.path.exists(PROJECT_HOME + '/enable-debug')
|
---|
12 | TEMPLATE_DEBUG = DEBUG
|
---|
13 |
|
---|
14 | # Required for Etags Caching Implementation
|
---|
15 | USE_ETAGS = True
|
---|
16 |
|
---|
17 | # Please mind(!), enabling will cause it to send emails when DEBUG=False
|
---|
18 | ADMINS = (
|
---|
19 | # ('Rick van der Zwet', 'info@rickvanderzwet.nl'),
|
---|
20 | )
|
---|
21 |
|
---|
22 | MANAGERS = ADMINS
|
---|
23 |
|
---|
24 | DATABASES = {
|
---|
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 |
|
---|
35 | CACHES = {
|
---|
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.
|
---|
52 | TIME_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
|
---|
56 | LANGUAGE_CODE = 'en-us'
|
---|
57 |
|
---|
58 | SITE_ID = 1
|
---|
59 |
|
---|
60 | # If you set this to False, Django will make some optimizations so as not
|
---|
61 | # to load the internationalization machinery.
|
---|
62 | USE_I18N = True
|
---|
63 |
|
---|
64 | # Absolute path to the directory that holds media.
|
---|
65 | # Example: "/home/media/media.lawrence.com/"
|
---|
66 | MEDIA_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/"
|
---|
72 | MEDIA_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/"
|
---|
78 | STATIC_ROOT = os.path.join(PROJECT_HOME,'sitestatic')
|
---|
79 |
|
---|
80 |
|
---|
81 | # URL prefix for static files.
|
---|
82 | # Example: "http://media.lawrence.com/static/"
|
---|
83 | STATIC_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/".
|
---|
88 | ADMIN_MEDIA_PREFIX = '/d/static/admin/'
|
---|
89 |
|
---|
90 | # Additional locations of static files
|
---|
91 | STATICFILES_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.
|
---|
100 | STATICFILES_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.
|
---|
107 | SECRET_KEY = '=wg@x19kr@26sibiaynb9ax5ddp1&yu^+$3n++^_lz1ms80syb'
|
---|
108 |
|
---|
109 | # List of callables that know how to import templates from various sources.
|
---|
110 | TEMPLATE_LOADERS = (
|
---|
111 | 'django.template.loaders.filesystem.Loader',
|
---|
112 | 'django.template.loaders.app_directories.Loader',
|
---|
113 | 'django.template.loaders.eggs.Loader',
|
---|
114 | )
|
---|
115 |
|
---|
116 | MIDDLEWARE_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 |
|
---|
125 | ROOT_URLCONF = 'urls'
|
---|
126 |
|
---|
127 | TEMPLATE_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 |
|
---|
134 | INSTALLED_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 | )
|
---|