質問編集履歴
1
settings.pyの内容を記載
test
CHANGED
File without changes
|
test
CHANGED
@@ -130,6 +130,280 @@
|
|
130
130
|
|
131
131
|
|
132
132
|
|
133
|
+
# settings.py
|
134
|
+
|
135
|
+
```python
|
136
|
+
|
137
|
+
# -*- coding: utf-8 -*-
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
import os
|
142
|
+
|
143
|
+
from django.core.mail import send_mail
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
SECRET_KEY = 'secret'
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
DEBUG = True
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
ALLOWED_HOSTS = ['127.0.0.1', 'test.com']
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
EMAIL_HOST = 'localhost'
|
164
|
+
|
165
|
+
EMAIL_PORT = 1025
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
INSTALLED_APPS = [
|
170
|
+
|
171
|
+
'jet',
|
172
|
+
|
173
|
+
'app.apps.AppConfig',
|
174
|
+
|
175
|
+
'django.contrib.admin',
|
176
|
+
|
177
|
+
'django.contrib.auth',
|
178
|
+
|
179
|
+
'django.contrib.contenttypes',
|
180
|
+
|
181
|
+
'django.contrib.sessions',
|
182
|
+
|
183
|
+
'django.contrib.messages',
|
184
|
+
|
185
|
+
'django.contrib.staticfiles',
|
186
|
+
|
187
|
+
'django.contrib.sites',
|
188
|
+
|
189
|
+
'django.contrib.sitemaps',
|
190
|
+
|
191
|
+
'social.apps.django_app.default',
|
192
|
+
|
193
|
+
'django_extensions',
|
194
|
+
|
195
|
+
'social_django',
|
196
|
+
|
197
|
+
'import_export',
|
198
|
+
|
199
|
+
'bootstrap_toolkit',
|
200
|
+
|
201
|
+
'django.contrib.humanize',
|
202
|
+
|
203
|
+
]
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
SITE_ID = 1
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
LOCALE_PATHS = [
|
212
|
+
|
213
|
+
os.path.join(BASE_DIR, 'locale'),
|
214
|
+
|
215
|
+
]
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
MIDDLEWARE = [
|
220
|
+
|
221
|
+
'django.middleware.security.SecurityMiddleware',
|
222
|
+
|
223
|
+
'django.contrib.sessions.middleware.SessionMiddleware',
|
224
|
+
|
225
|
+
'django.middleware.locale.LocaleMiddleware',
|
226
|
+
|
227
|
+
'django.middleware.common.CommonMiddleware',
|
228
|
+
|
229
|
+
'django.middleware.csrf.CsrfViewMiddleware',
|
230
|
+
|
231
|
+
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
232
|
+
|
233
|
+
'django.contrib.messages.middleware.MessageMiddleware',
|
234
|
+
|
235
|
+
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
236
|
+
|
237
|
+
]
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
if DEBUG:
|
242
|
+
|
243
|
+
INTERNAL_IPS = ('127.0.0.1',)
|
244
|
+
|
245
|
+
MIDDLEWARE += (
|
246
|
+
|
247
|
+
'debug_toolbar.middleware.DebugToolbarMiddleware',
|
248
|
+
|
249
|
+
)
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
INSTALLED_APPS += (
|
254
|
+
|
255
|
+
'debug_toolbar',
|
256
|
+
|
257
|
+
)
|
258
|
+
|
259
|
+
DEBUG_TOOLBAR_PANELS = [
|
260
|
+
|
261
|
+
'debug_toolbar.panels.versions.VersionsPanel',
|
262
|
+
|
263
|
+
'debug_toolbar.panels.timer.TimerPanel',
|
264
|
+
|
265
|
+
'debug_toolbar.panels.settings.SettingsPanel',
|
266
|
+
|
267
|
+
'debug_toolbar.panels.headers.HeadersPanel',
|
268
|
+
|
269
|
+
'debug_toolbar.panels.request.RequestPanel',
|
270
|
+
|
271
|
+
'debug_toolbar.panels.sql.SQLPanel',
|
272
|
+
|
273
|
+
'debug_toolbar.panels.staticfiles.StaticFilesPanel',
|
274
|
+
|
275
|
+
'debug_toolbar.panels.templates.TemplatesPanel',
|
276
|
+
|
277
|
+
'debug_toolbar.panels.cache.CachePanel',
|
278
|
+
|
279
|
+
'debug_toolbar.panels.signals.SignalsPanel',
|
280
|
+
|
281
|
+
'debug_toolbar.panels.logging.LoggingPanel',
|
282
|
+
|
283
|
+
'debug_toolbar.panels.redirects.RedirectsPanel',
|
284
|
+
|
285
|
+
]
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
DEBUG_TOOLBAR_CONFIG = {
|
290
|
+
|
291
|
+
'INTERCEPT_REDIRECTS': False,
|
292
|
+
|
293
|
+
}
|
294
|
+
|
295
|
+
|
296
|
+
|
297
|
+
ROOT_URLCONF = 'project.urls'
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
TEMPLATES = [
|
302
|
+
|
303
|
+
{
|
304
|
+
|
305
|
+
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
306
|
+
|
307
|
+
'DIRS': [],
|
308
|
+
|
309
|
+
'APP_DIRS': True,
|
310
|
+
|
311
|
+
'OPTIONS': {
|
312
|
+
|
313
|
+
'context_processors': [
|
314
|
+
|
315
|
+
'django.template.context_processors.debug',
|
316
|
+
|
317
|
+
'django.template.context_processors.request',
|
318
|
+
|
319
|
+
'django.contrib.auth.context_processors.auth',
|
320
|
+
|
321
|
+
'django.contrib.messages.context_processors.messages',
|
322
|
+
|
323
|
+
'social.apps.django_app.context_processors.backends',
|
324
|
+
|
325
|
+
'social.apps.django_app.context_processors.login_redirect',
|
326
|
+
|
327
|
+
'django.template.context_processors.static',
|
328
|
+
|
329
|
+
],
|
330
|
+
|
331
|
+
},
|
332
|
+
|
333
|
+
},
|
334
|
+
|
335
|
+
]
|
336
|
+
|
337
|
+
|
338
|
+
|
339
|
+
AUTHENTICATION_BACKENDS = (
|
340
|
+
|
341
|
+
'social_core.backends.facebook.FacebookOAuth2',
|
342
|
+
|
343
|
+
'django.contrib.auth.backends.ModelBackend',
|
344
|
+
|
345
|
+
)
|
346
|
+
|
347
|
+
|
348
|
+
|
349
|
+
LOGIN_REDIRECT_URL = '/'
|
350
|
+
|
351
|
+
AUTH_USER_MODEL = 'app.CustomUser'
|
352
|
+
|
353
|
+
|
354
|
+
|
355
|
+
WSGI_APPLICATION = 'project.wsgi.application'
|
356
|
+
|
357
|
+
|
358
|
+
|
359
|
+
DATABASES = {
|
360
|
+
|
361
|
+
}
|
362
|
+
|
363
|
+
}
|
364
|
+
|
365
|
+
|
366
|
+
|
367
|
+
LANGUAGE_CODE = 'en-us'
|
368
|
+
|
369
|
+
|
370
|
+
|
371
|
+
TIME_ZONE = 'Asia/Tokyo'
|
372
|
+
|
373
|
+
|
374
|
+
|
375
|
+
USE_I18N = True
|
376
|
+
|
377
|
+
|
378
|
+
|
379
|
+
USE_L10N = True
|
380
|
+
|
381
|
+
|
382
|
+
|
383
|
+
USE_TZ = False
|
384
|
+
|
385
|
+
|
386
|
+
|
387
|
+
STATIC_URL = '/static/'
|
388
|
+
|
389
|
+
|
390
|
+
|
391
|
+
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
|
392
|
+
|
393
|
+
MEDIA_URL = '/media/'
|
394
|
+
|
395
|
+
|
396
|
+
|
397
|
+
STATIC_ROOT = os.path.join(BASE_DIR, "/app/static/")
|
398
|
+
|
399
|
+
|
400
|
+
|
401
|
+
```
|
402
|
+
|
403
|
+
|
404
|
+
|
405
|
+
|
406
|
+
|
133
407
|
どこの設定を直せばよいか、手掛かりが分からず困っております。
|
134
408
|
|
135
409
|
お気づきの点があれば、ご教示頂ければ幸いです。
|