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