-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.py
191 lines (152 loc) · 5.69 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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
from settings_local import *
import os
import django
# calculated paths for django and the site
# used as starting points for various other paths
DJANGO_ROOT = os.path.dirname(os.path.realpath(django.__file__))
PROJECT_PATH = os.path.dirname(os.path.abspath(__file__))
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# If running in a Windows environment this must be set to the same as your
# system time zone.
TIME_ZONE = 'America/Los_Angeles'
# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = 'en-us'
SITE_ID = 1
# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True
# Absolute path to the directory that holds media.
MEDIA_ROOT = os.path.join(PROJECT_PATH, 'static')
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash if there is a path component (optional in other cases).
MEDIA_URL = 'https://s3.amazonaws.com/art_acclaim/'
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
# trailing slash.
# Examples: "http://foo.com/media/", "/media/".
ADMIN_MEDIA_PREFIX = '/admin-media/'
# Make this unique, and don't share it with anybody.
SECRET_KEY = '$z8ps0bs=e4s*kjo42!#*g3423rsrl=b-n0n)+(!0c*-s9ihq!j'
#Cache System (memcache)
CACHE_BACKEND = 'memcached://127.0.0.1:11211/'
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.load_template_source',
'django.template.loaders.app_directories.load_template_source',
)
TEMPLATE_CONTEXT_PROCESSORS = (
"django.core.context_processors.auth",
"django.core.context_processors.debug",
"django.core.context_processors.i18n",
"django.core.context_processors.media",
"django.core.context_processors.request",
'context_processors.user_context',
)
INTERNAL_IPS = ('127.0.0.1','10.176.105.169','75.82.209.7')
MIDDLEWARE_CLASSES = (
'django.middleware.gzip.GZipMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'request.middleware.RequestMiddleware',
'django.middleware.http.ConditionalGetMiddleware',
'django.middleware.common.CommonMiddleware',
'pagination.middleware.PaginationMiddleware',
'debug_toolbar.middleware.DebugToolbarMiddleware', #POS will cause errors on vote
'tracking.middleware.BannedIPMiddleware',
'tracking.middleware.VisitorTrackingMiddleware',
'tracking.middleware.VisitorCleanUpMiddleware',
)
ROOT_URLCONF = 'urls'
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
os.path.join(PROJECT_PATH, 'layouts'),
)
#Django-Registration
ACCOUNT_ACTIVATION_DAYS = 7 #One-week activation window; you may, of course, use a different value.
# Various apps available
DEBUG_TOOLBAR_PANELS = (
'debug_toolbar.panels.version.VersionDebugPanel',
'debug_toolbar.panels.timer.TimerDebugPanel',
'debug_toolbar.panels.settings_vars.SettingsVarsDebugPanel',
'debug_toolbar.panels.headers.HeaderDebugPanel',
'debug_toolbar.panels.request_vars.RequestVarsDebugPanel',
'debug_toolbar.panels.template.TemplateDebugPanel',
'debug_toolbar.panels.sql.SQLDebugPanel',
'debug_toolbar.panels.signals.SignalDebugPanel',
'debug_toolbar.panels.logger.LoggingPanel',
'debug_toolbar.panels.cache.CacheDebugPanel',
)
DEBUG_TOOLBAR_CONFIG = {
'INTERCEPT_REDIRECTS': False,
'EXTRA_SIGNALS': ['signals.image_uploaded'],
'HIDE_DJANGO_SQL': False,
'TAG': 'div',
}
AUTH_PROFILE_MODULE = "profiles.Profile"
AUTHENTICATION_BACKENDS = (
'main_site.views.EmailOrUsernameModelBackend',
'django.contrib.auth.backends.ModelBackend'
)
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.humanize',
'django.contrib.admin',
'pagination',
'haystack',
'friends',
'main_site',
'voting',
'request',
'registration',
'profiles',
'portfolio',
'south',
'image_guru',
'hitcount',
'storages',
# 'tracking',
# 'devserver',
'debug_toolbar',
'django_extensions',
)
#Haystack
HAYSTACK_SITECONF = 'search_sites'
HAYSTACK_SEARCH_ENGINE = 'xapian'
HAYSTACK_XAPIAN_PATH = os.path.join(PROJECT_PATH, 'xapian_search/')
#Django-pagination
PAGINATION_DEFAULT_PAGINATION = 15
PAGINATION_DEFAULT_WINDOW = 2
#Django-Hitcounter
#http://blog.damontimm.com/django-hitcount-app-count-hits-views/
#git://github.com/thornomad/django-hitcount.git
HITCOUNT_KEEP_HIT_ACTIVE = { 'days': 7 }
HITCOUNT_HITS_PER_IP_LIMIT = 0
#HITCOUNT_EXCLUDE_USER_GROUP = ( 'Editor', )
#django-devserver
DEVSERVER_MODULES = (
'devserver.modules.sql.SQLRealTimeModule',
'devserver.modules.sql.SQLSummaryModule',
'devserver.modules.profile.ProfileSummaryModule',
# Modules not enabled by default
'devserver.modules.ajax.AjaxDumpModule',
'devserver.modules.profile.MemoryUseModule',
'devserver.modules.cache.CacheSummaryModule',
'devserver.modules.request.SessionInfoModule',
)
DEVSERVER_IGNORED_PREFIXES = ['/static']
REQUEST_IGNORE_PATHS = (
r'^static/(.*)',
r'^favicon\.ico|favicon\.ico/$',
r'^__debug__/',
r'^tinymce/(.*)',
r'^admin/(.*)',
)