|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+import os
|
|
|
2
|
+
|
|
|
3
|
+PROJECT_DIR = os.path.dirname(__file__)
|
|
|
4
|
+location = lambda x: os.path.join(os.path.dirname(os.path.realpath(__file__)), x)
|
|
|
5
|
+
|
|
|
6
|
+DEBUG = True
|
|
|
7
|
+TEMPLATE_DEBUG = True
|
|
|
8
|
+SQL_DEBUG = True
|
|
|
9
|
+
|
|
|
10
|
+ADMINS = (
|
|
|
11
|
+ # ('Your Name', 'your_email@domain.com'),
|
|
|
12
|
+)
|
|
|
13
|
+EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
|
|
|
14
|
+
|
|
|
15
|
+MANAGERS = ADMINS
|
|
|
16
|
+
|
|
|
17
|
+DATABASES = {
|
|
|
18
|
+ 'default': {
|
|
|
19
|
+ 'ENGINE': 'django.db.backends.sqlite3',
|
|
|
20
|
+ 'NAME': '/tmp/oscar_vanilla',
|
|
|
21
|
+ 'USER': '',
|
|
|
22
|
+ 'PASSWORD': '',
|
|
|
23
|
+ 'HOST': '',
|
|
|
24
|
+ 'PORT': '',
|
|
|
25
|
+ }
|
|
|
26
|
+}
|
|
|
27
|
+
|
|
|
28
|
+
|
|
|
29
|
+
|
|
|
30
|
+# Local time zone for this installation. Choices can be found here:
|
|
|
31
|
+# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
|
|
|
32
|
+# although not all choices may be available on all operating systems.
|
|
|
33
|
+# On Unix systems, a value of None will cause Django to use the same
|
|
|
34
|
+# timezone as the operating system.
|
|
|
35
|
+# If running in a Windows environment this must be set to the same as your
|
|
|
36
|
+# system time zone.
|
|
|
37
|
+TIME_ZONE = 'Europe/London'
|
|
|
38
|
+
|
|
|
39
|
+# Language code for this installation. All choices can be found here:
|
|
|
40
|
+# http://www.i18nguy.com/unicode/language-identifiers.html
|
|
|
41
|
+LANGUAGE_CODE = 'en-us'
|
|
|
42
|
+
|
|
|
43
|
+SITE_ID = 1
|
|
|
44
|
+
|
|
|
45
|
+# If you set this to False, Django will make some optimizations so as not
|
|
|
46
|
+# to load the internationalization machinery.
|
|
|
47
|
+USE_I18N = True
|
|
|
48
|
+
|
|
|
49
|
+# If you set this to False, Django will not format dates, numbers and
|
|
|
50
|
+# calendars according to the current locale
|
|
|
51
|
+USE_L10N = True
|
|
|
52
|
+
|
|
|
53
|
+# Absolute path to the directory that holds media.
|
|
|
54
|
+# Example: "/home/media/media.lawrence.com/"
|
|
|
55
|
+MEDIA_ROOT = location("assets")
|
|
|
56
|
+
|
|
|
57
|
+# URL that handles the media served from MEDIA_ROOT. Make sure to use a
|
|
|
58
|
+# trailing slash if there is a path component (optional in other cases).
|
|
|
59
|
+# Examples: "http://media.lawrence.com", "http://example.com/media/"
|
|
|
60
|
+MEDIA_URL = '/media/'
|
|
|
61
|
+
|
|
|
62
|
+# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
|
|
|
63
|
+# trailing slash.
|
|
|
64
|
+# Examples: "http://foo.com/media/", "/media/".
|
|
|
65
|
+ADMIN_MEDIA_PREFIX = '/media/admin/'
|
|
|
66
|
+
|
|
|
67
|
+# Make this unique, and don't share it with anybody.
|
|
|
68
|
+SECRET_KEY = '$)a7n&o80u!6y5t-+jrd3)3!%vh&shg$wqpjpxc!ar&p#!)n1a'
|
|
|
69
|
+
|
|
|
70
|
+# List of callables that know how to import templates from various sources.
|
|
|
71
|
+TEMPLATE_LOADERS = (
|
|
|
72
|
+ 'django.template.loaders.filesystem.Loader',
|
|
|
73
|
+ 'django.template.loaders.app_directories.Loader',
|
|
|
74
|
+)
|
|
|
75
|
+
|
|
|
76
|
+TEMPLATE_CONTEXT_PROCESSORS = (
|
|
|
77
|
+ "django.contrib.auth.context_processors.auth",
|
|
|
78
|
+ "django.core.context_processors.request",
|
|
|
79
|
+ "django.core.context_processors.debug",
|
|
|
80
|
+ "django.core.context_processors.i18n",
|
|
|
81
|
+ "django.core.context_processors.media",
|
|
|
82
|
+ "django.core.context_processors.static",
|
|
|
83
|
+ "django.contrib.messages.context_processors.messages",
|
|
|
84
|
+ # Oscar specific
|
|
|
85
|
+ 'oscar.apps.search.context_processors.search_form',
|
|
|
86
|
+ 'oscar.apps.promotions.context_processors.promotions',
|
|
|
87
|
+ 'oscar.apps.promotions.context_processors.merchandising_blocks',
|
|
|
88
|
+)
|
|
|
89
|
+
|
|
|
90
|
+MIDDLEWARE_CLASSES = (
|
|
|
91
|
+ 'django.middleware.common.CommonMiddleware',
|
|
|
92
|
+ 'django.contrib.sessions.middleware.SessionMiddleware',
|
|
|
93
|
+ 'django.middleware.csrf.CsrfViewMiddleware',
|
|
|
94
|
+ 'django.contrib.auth.middleware.AuthenticationMiddleware',
|
|
|
95
|
+ 'django.contrib.messages.middleware.MessageMiddleware',
|
|
|
96
|
+ 'django.middleware.transaction.TransactionMiddleware',
|
|
|
97
|
+ 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
|
|
|
98
|
+ # Oscar specific
|
|
|
99
|
+ 'oscar.apps.basket.middleware.BasketMiddleware'
|
|
|
100
|
+)
|
|
|
101
|
+
|
|
|
102
|
+INTERNAL_IPS = ('127.0.0.1',)
|
|
|
103
|
+
|
|
|
104
|
+ROOT_URLCONF = 'urls'
|
|
|
105
|
+
|
|
|
106
|
+TEMPLATE_DIRS = (
|
|
|
107
|
+ # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
|
|
|
108
|
+ # Always use forward slashes, even on Windows.
|
|
|
109
|
+ # Don't forget to use absolute paths, not relative paths.
|
|
|
110
|
+)
|
|
|
111
|
+
|
|
|
112
|
+# A sample logging configuration. The only tangible logging
|
|
|
113
|
+# performed by this configuration is to send an email to
|
|
|
114
|
+# the site admins on every HTTP 500 error.
|
|
|
115
|
+# See http://docs.djangoproject.com/en/dev/topics/logging for
|
|
|
116
|
+# more details on how to customize your logging configuration.
|
|
|
117
|
+LOGGING = {
|
|
|
118
|
+ 'version': 1,
|
|
|
119
|
+ 'disable_existing_loggers': False,
|
|
|
120
|
+ 'formatters': {
|
|
|
121
|
+ 'verbose': {
|
|
|
122
|
+ 'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s'
|
|
|
123
|
+ },
|
|
|
124
|
+ 'simple': {
|
|
|
125
|
+ 'format': '%(levelname)s %(message)s'
|
|
|
126
|
+ },
|
|
|
127
|
+ },
|
|
|
128
|
+ 'handlers': {
|
|
|
129
|
+ 'null': {
|
|
|
130
|
+ 'level':'DEBUG',
|
|
|
131
|
+ 'class':'django.utils.log.NullHandler',
|
|
|
132
|
+ },
|
|
|
133
|
+ 'console':{
|
|
|
134
|
+ 'level':'DEBUG',
|
|
|
135
|
+ 'class':'logging.StreamHandler',
|
|
|
136
|
+ 'formatter': 'verbose'
|
|
|
137
|
+ },
|
|
|
138
|
+ 'file': {
|
|
|
139
|
+ 'level': 'INFO',
|
|
|
140
|
+ 'class': 'logging.FileHandler',
|
|
|
141
|
+ 'filename': '/tmp/oscar.log',
|
|
|
142
|
+ 'formatter': 'verbose'
|
|
|
143
|
+ },
|
|
|
144
|
+ 'mail_admins': {
|
|
|
145
|
+ 'level': 'ERROR',
|
|
|
146
|
+ 'class': 'django.utils.log.AdminEmailHandler',
|
|
|
147
|
+ },
|
|
|
148
|
+ },
|
|
|
149
|
+ 'loggers': {
|
|
|
150
|
+ 'django': {
|
|
|
151
|
+ 'handlers':['null'],
|
|
|
152
|
+ 'propagate': True,
|
|
|
153
|
+ 'level':'INFO',
|
|
|
154
|
+ },
|
|
|
155
|
+ 'django.request': {
|
|
|
156
|
+ 'handlers': ['mail_admins'],
|
|
|
157
|
+ 'level': 'ERROR',
|
|
|
158
|
+ 'propagate': False,
|
|
|
159
|
+ },
|
|
|
160
|
+ 'oscar.checkout': {
|
|
|
161
|
+ 'handlers': ['console'],
|
|
|
162
|
+ 'propagate': True,
|
|
|
163
|
+ 'level':'INFO',
|
|
|
164
|
+ },
|
|
|
165
|
+ 'django.db.backends': {
|
|
|
166
|
+ 'handlers':['null'],
|
|
|
167
|
+ 'propagate': False,
|
|
|
168
|
+ 'level':'DEBUG',
|
|
|
169
|
+ },
|
|
|
170
|
+ }
|
|
|
171
|
+}
|
|
|
172
|
+
|
|
|
173
|
+
|
|
|
174
|
+INSTALLED_APPS = (
|
|
|
175
|
+ 'django.contrib.auth',
|
|
|
176
|
+ 'django.contrib.contenttypes',
|
|
|
177
|
+ 'django.contrib.sessions',
|
|
|
178
|
+ 'django.contrib.sites',
|
|
|
179
|
+ 'django.contrib.messages',
|
|
|
180
|
+ 'django.contrib.admin',
|
|
|
181
|
+ 'django.contrib.flatpages',
|
|
|
182
|
+ # External dependencies
|
|
|
183
|
+ 'haystack',
|
|
|
184
|
+ 'sorl.thumbnail',
|
|
|
185
|
+ # Apps from oscar
|
|
|
186
|
+ 'oscar',
|
|
|
187
|
+ 'oscar.apps.analytics',
|
|
|
188
|
+ 'oscar.apps.discount',
|
|
|
189
|
+ 'oscar.apps.order',
|
|
|
190
|
+ 'oscar.apps.checkout',
|
|
|
191
|
+ 'oscar.apps.shipping',
|
|
|
192
|
+ 'oscar.apps.order_management',
|
|
|
193
|
+ 'oscar.apps.product',
|
|
|
194
|
+ 'oscar.apps.basket',
|
|
|
195
|
+ 'oscar.apps.payment',
|
|
|
196
|
+ 'oscar.apps.offer',
|
|
|
197
|
+ 'oscar.apps.address',
|
|
|
198
|
+ 'oscar.apps.partner',
|
|
|
199
|
+ 'oscar.apps.image',
|
|
|
200
|
+ 'oscar.apps.customer',
|
|
|
201
|
+ 'oscar.apps.promotions',
|
|
|
202
|
+ 'oscar.apps.reports',
|
|
|
203
|
+ 'oscar.apps.search',
|
|
|
204
|
+ 'oscar.apps.product.reviews',
|
|
|
205
|
+ 'oscar.apps.payment.datacash',
|
|
|
206
|
+)
|
|
|
207
|
+
|
|
|
208
|
+LOGIN_REDIRECT_URL = '/accounts/profile/'
|
|
|
209
|
+APPEND_SLASH = True
|
|
|
210
|
+
|
|
|
211
|
+# Oscar settings
|
|
|
212
|
+from oscar.defaults import *
|
|
|
213
|
+
|
|
|
214
|
+# Haystack settings
|
|
|
215
|
+HAYSTACK_SITECONF = 'oscar.search_sites'
|
|
|
216
|
+HAYSTACK_SEARCH_ENGINE = 'dummy'
|