forked from OpenTreeMap/otm-legacy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.py
executable file
·149 lines (126 loc) · 4.12 KB
/
settings.py
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
import os
import djcelery
djcelery.setup_loader()
# The following settings should be overriden in your
# local_settings.py or impl_settings.py file if needed
ADD_INITIAL_DEFAULTS = {}
ADD_FORM_TARGETS = [
('addsame', 'I want to add another tree using the same tree details'),
('add', 'I want to add another tree with new details'),
('edit','Let me continue editing this tree'),
('view', "I'm done!"),
]
ADD_FORM_TARGETS_DEFAULT = 'view'
API_KEY_GOOGLE_MAP = '' # Can be empty
API_KEY_GOOGLE_ANALYTICS = 'your-key-here'
POSTAL_CODE_FIELD = "USZipCodeField"
DBH_TO_INCHES_FACTOR = 1.0
PENDING_REQUIRED_FOR_PUBLIC_EDITING_PUBLIC_TREES = False
ADVANCED_USERS_CAN_ACCEPT_PENDING = False
# Certain email servers (most, all?) prohibit traffic
# that appears to be routed from someone on the network
#
# For instance, if all mail from an OTM site is going to
# [email protected] and jim ("[email protected]") sends feedback
# the message structure will look like:
# From: [email protected]
# To: [email protected]
# ....
# But mail.company.com will *reject* the email since it is
# actually originating from otm's servers and masquerading
# as company.com
FORCE_MAIL_TO_BE_FROM = None
DEBUG = True
try:
from impl_settings import *
except ImportError, e:
pass
OTM_VERSION = "1.2"
API_VERSION = "0.1"
TEMPLATE_DEBUG = DEBUG
# sorl thumbnail settings
THUMBNAIL_DEBUG = True
THUMBNAIL_SUBDIR = '_thumbs'
AUTH_PROFILE_MODULE = 'profiles.userprofile'
# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = 'en-us'
# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = False
ROOT_URLCONF = 'urls'
# celery config
BROKER_URL = 'redis://localhost:6379/0'
TEST_RUNNER = 'djcelery.contrib.test_runner.CeleryTestSuiteRunner'
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.load_template_source',
)
from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS
TEMPLATE_CONTEXT_PROCESSORS += (
#"django.core.context_processors.auth",
"django.contrib.auth.context_processors.auth",
"django.core.context_processors.debug",
"django.core.context_processors.i18n",
"django.core.context_processors.media",
'django.core.context_processors.request',
'django.contrib.messages.context_processors.messages',
'treemap.context_processors.site_root'
)
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.middleware.transaction.TransactionMiddleware',
'django.contrib.csrf.middleware.CsrfViewMiddleware',
'django.contrib.csrf.middleware.CsrfResponseMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django_reputation.middleware.ReputationMiddleware',
'pagination.middleware.PaginationMiddleware',
'django_sorting.middleware.SortingMiddleware',
)
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
'django.contrib.databrowse',
'django.contrib.gis',
'django.contrib.humanize',
'django.contrib.webdesign',
'django.contrib.markup',
'django.contrib.flatpages',
'django.contrib.messages',
'django.contrib.staticfiles',
'threadedcomments',
'treemap',
'api',
'registration',
'template_utils',
'profiles',
'django_reputation',
'tagging',
'south',
'sorl.thumbnail',
'classfaves',
'qs_tiles',
'treekey',
'badges',
'pagination',
'django_sorting',
'pipeline',
'importer',
'djcelery',
'polygons'
)
try:
from local_settings import *
except ImportError, exp:
pass
if SITE_ROOT is not "/":
LOGIN_URL = "%s/accounts/login" % SITE_ROOT
else:
LOGIN_URL = "/accounts/login"