[9041] | 1 | # Django settings for persisted project.
|
---|
| 2 |
|
---|
| 3 | import os
|
---|
[9189] | 4 | PROJECT_HOME = os.path.abspath(os.path.dirname(__file__))
|
---|
[9372] | 5 |
|
---|
[9544] | 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 |
|
---|
[9385] | 11 | DEBUG = os.path.exists(PROJECT_HOME + '/enable-debug')
|
---|
[9041] | 12 | TEMPLATE_DEBUG = DEBUG
|
---|
| 13 |
|
---|
[9188] | 14 | # Required for Etags Caching Implementation
|
---|
| 15 | USE_ETAGS = True
|
---|
| 16 |
|
---|
[9394] | 17 | # Please mind(!), enabling will cause it to send emails when DEBUG=False
|
---|
[9041] | 18 | ADMINS = (
|
---|
[9394] | 19 | # ('Rick van der Zwet', 'info@rickvanderzwet.nl'),
|
---|
[9041] | 20 | )
|
---|
| 21 |
|
---|
| 22 | MANAGERS = ADMINS
|
---|
| 23 |
|
---|
| 24 | DATABASES = {
|
---|
| 25 | 'default': {
|
---|
[9051] | 26 | 'ENGINE': 'django.db.backends.mysql',
|
---|
| 27 | 'NAME': 'project_heatmap',
|
---|
| 28 | 'USER': 'root',
|
---|
[9358] | 29 | 'PASSWORD': '',
|
---|
[9051] | 30 | 'HOST': 'localhost',
|
---|
| 31 | 'PORT': '3306',
|
---|
[9041] | 32 | }
|
---|
| 33 | }
|
---|
| 34 |
|
---|
[9188] | 35 | CACHES = {
|
---|
| 36 | 'default': {
|
---|
[9385] | 37 | 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
|
---|
| 38 | 'LOCATION': '127.0.0.1:11211',
|
---|
[9189] | 39 | 'TIMEOUT': 3600 * 24 * 7,
|
---|
| 40 | 'OPTIONS': {
|
---|
| 41 | 'MAX_ENTRIES': 100000
|
---|
| 42 | }
|
---|
[9385] | 43 | },
|
---|
[9188] | 44 | }
|
---|
| 45 |
|
---|
| 46 |
|
---|
[9041] | 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/"
|
---|
[9395] | 66 | MEDIA_ROOT = os.path.join(PROJECT_HOME,'sitemedia')
|
---|
[9041] | 67 |
|
---|
[9395] | 68 |
|
---|
[9041] | 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/"
|
---|
[9544] | 72 | MEDIA_URL = DJANGO_PREFIX + '/media/'
|
---|
[9041] | 73 |
|
---|
[9139] | 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/"
|
---|
[9395] | 78 | STATIC_ROOT = os.path.join(PROJECT_HOME,'sitestatic')
|
---|
[9139] | 79 |
|
---|
[9544] | 80 |
|
---|
[9139] | 81 | # URL prefix for static files.
|
---|
| 82 | # Example: "http://media.lawrence.com/static/"
|
---|
[9544] | 83 | STATIC_URL = DJANGO_PREFIX + '/static/'
|
---|
[9139] | 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/".
|
---|
[9545] | 88 | ADMIN_MEDIA_PREFIX = '/d/static/admin/'
|
---|
[9139] | 89 |
|
---|
| 90 | # Additional locations of static files
|
---|
| 91 | STATICFILES_DIRS = (
|
---|
[9358] | 92 | # PROJECT_HOME + '/static',
|
---|
[9139] | 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 |
|
---|
[9041] | 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 = (
|
---|
[9389] | 111 | 'django.template.loaders.filesystem.Loader',
|
---|
| 112 | 'django.template.loaders.app_directories.Loader',
|
---|
| 113 | 'django.template.loaders.eggs.Loader',
|
---|
[9041] | 114 | )
|
---|
| 115 |
|
---|
| 116 | MIDDLEWARE_CLASSES = (
|
---|
[9188] | 117 | 'django.middleware.cache.UpdateCacheMiddleware',
|
---|
[9358] | 118 | 'django.middleware.common.CommonMiddleware',
|
---|
| 119 | 'django.middleware.cache.FetchFromCacheMiddleware',
|
---|
| 120 | 'django.middleware.http.ConditionalGetMiddleware',
|
---|
[9041] | 121 | 'django.contrib.sessions.middleware.SessionMiddleware',
|
---|
| 122 | 'django.contrib.auth.middleware.AuthenticationMiddleware',
|
---|
| 123 | )
|
---|
| 124 |
|
---|
[9139] | 125 | ROOT_URLCONF = 'urls'
|
---|
[9041] | 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.
|
---|
[9051] | 130 | # Don't forget to use absolute paths, not relative paths.
|
---|
[9041] | 131 | os.path.join(PROJECT_HOME, 'templates'),
|
---|
| 132 | )
|
---|
| 133 |
|
---|
| 134 | INSTALLED_APPS = (
|
---|
[9051] | 135 | 'django.contrib.admin',
|
---|
[9041] | 136 | 'django.contrib.auth',
|
---|
| 137 | 'django.contrib.contenttypes',
|
---|
| 138 | 'django.contrib.sessions',
|
---|
| 139 | 'django.contrib.sites',
|
---|
[9358] | 140 | 'django.contrib.staticfiles',
|
---|
[9041] | 141 | 'django_extensions',
|
---|
[9139] | 142 | 'gheat',
|
---|
[9376] | 143 | 'wlheatmap',
|
---|
[9041] | 144 | )
|
---|