forked from johnthedebs/basicproject
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.py
More file actions
164 lines (136 loc) · 3.58 KB
/
settings.py
File metadata and controls
164 lines (136 loc) · 3.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
import os.path
PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))
DEBUG = True
COMPRESS = not DEBUG
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ("Your Name", "your_email@domain.com"),
)
MANAGERS = ADMINS
CACHES = {
"default": {
"BACKEND" : "django.core.cache.backends.dummy.DummyCache",
"LOCATION" : "",
}
}
DATABASES = {
"default": {
"ENGINE" : "django.contrib.gis.db.backends.postgis",
"NAME" : "basicproject",
"USER" : "basicproject",
"PASSWORD" : "basicproject",
"HOST" : "",
"PORT" : "",
}
}
SITE_ID = 1
TIME_ZONE = "UTC"
USE_TZ = True
LANGUAGE_CODE = "en-us"
USE_I18N = False
USE_L10N = False
MEDIA_URL = "/media/"
STATIC_URL = "/static/"
COMPRESS_URL = STATIC_URL
MEDIA_ROOT = os.path.join(PROJECT_ROOT, "..", "site_media", "media")
STATIC_ROOT = os.path.join(PROJECT_ROOT, "..", "site_media", "static")
STATICFILES_DIRS = (
os.path.join(PROJECT_ROOT, "static_files"),
)
STATICFILES_FINDERS = (
"django.contrib.staticfiles.finders.FileSystemFinder",
"django.contrib.staticfiles.finders.AppDirectoriesFinder",
"compressor.finders.CompressorFinder",
)
SECRET_KEY = "{{ secret_key }}"
TEMPLATE_LOADERS = (
"django.template.loaders.filesystem.Loader",
"django.template.loaders.app_directories.Loader",
)
MIDDLEWARE_CLASSES = (
"django.middleware.common.CommonMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"django.middleware.csrf.CsrfViewMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
)
ROOT_URLCONF = "core.urls"
TEMPLATE_DIRS = (
os.path.join(PROJECT_ROOT, "templates"),
)
TEMPLATE_CONTEXT_PROCESSORS = (
"django.contrib.auth.context_processors.auth",
"django.core.context_processors.csrf",
"django.core.context_processors.debug",
"django.core.context_processors.static",
)
INSTALLED_APPS = (
"django.contrib.admin",
"django.contrib.auth",
"django.contrib.contenttypes",
#"django.contrib.gis",
"django.contrib.messages",
"django.contrib.sessions",
"django.contrib.sites",
"django.contrib.staticfiles",
# External apps
"compressor",
#"debug_toolbar",
"django_extensions",
"raven.contrib.django.raven_compat",
"rest_framework",
"south",
# Internal apps
"core",
)
INTERNAL_IPS = (
"127.0.0.1",
)
DEBUG_TOOLBAR_CONFIG = {
"INTERCEPT_REDIRECTS" : False,
}
LOGGING = {
"version": 1,
"disable_existing_loggers": True,
"formatters": {
"verbose": {
"datefmt" : "%Y-%m-%d %H:%M:%S",
"format" : "[%(asctime)s] [%(levelname)s] [%(module)s] %(message)s",
},
},
"handlers": {
"sentry": {
"level" : "INFO",
"class" : "raven.contrib.django.handlers.SentryHandler",
},
"console": {
"level" : "DEBUG",
"class" : "logging.StreamHandler",
"formatter" : "verbose",
},
},
"root": {
"level" : "INFO",
"handlers" : ["sentry"],
},
"loggers": {
"django": {
"level" : "INFO",
"handlers" : ["sentry"],
},
"raven": {
"level" : "DEBUG",
"handlers" : ["console"],
"propagate" : False,
},
"sentry.errors": {
"level" : "DEBUG",
"handlers" : ["console"],
"propagate" : False,
},
},
}
try:
from local_settings import *
except ImportError:
pass