質問編集履歴

4

文の修正

2021/02/25 15:25

投稿

yayaya22
yayaya22

スコア51

test CHANGED
File without changes
test CHANGED
@@ -104,274 +104,8 @@
104
104
 
105
105
 
106
106
 
107
- import os
108
-
109
-
110
-
111
-
112
-
113
- BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
114
-
115
- ROOT_DIR = os.path.dirname(BASE_DIR)
116
-
117
- TEMPLATES_DIR = os.path.join(BASE_DIR, 'templates')
118
-
119
- STATIC_DIR = os.path.join(BASE_DIR, 'static')
120
-
121
- SECRET_KEY = '&0j%xa3p@mbir_m03kg*9j9mqri^q#_vmv+=8^n&xs09p&td-1'
122
-
123
-
124
-
125
- ALLOWED_HOSTS = ["*"]
126
-
127
-
128
-
129
- ADMIN_USERNAME = 'lhy'
130
-
131
- ADMIN_PASSWORD = 'pbkdf2_sha256$180000$nMNyyIvw0TgW$BWgVFXrb25VY7+QVURr4/QawrSTbHIksIYzoC3rWyRc='
132
-
133
- AUTHENTICATION_BACKENDS = [
134
-
135
- 'django.contrib.auth.backends.ModelBackend',
136
-
137
- 'config.backends.SettingsBackend',
138
-
139
- ]
140
-
141
-
142
-
143
-
144
-
145
- # Application definition
146
-
147
-
148
-
149
- INSTALLED_APPS = [
150
-
151
- 'django.contrib.admin',
152
-
153
- 'django.contrib.auth',
154
-
155
- 'django.contrib.contenttypes',
156
-
157
- 'django.contrib.sessions',
158
-
159
- 'django.contrib.messages',
160
-
161
- 'django.contrib.staticfiles',
162
-
163
-
164
-
165
- 'django_extensions',
166
-
167
- 'django_quill',
168
-
169
-
170
-
171
- 'posts',
172
-
173
- ]
174
-
175
-
176
-
177
- MIDDLEWARE = [
178
-
179
- 'django.middleware.security.SecurityMiddleware',
180
-
181
- 'django.contrib.sessions.middleware.SessionMiddleware',
182
-
183
- 'django.middleware.common.CommonMiddleware',
184
-
185
- 'django.middleware.csrf.CsrfViewMiddleware',
186
-
187
- 'django.contrib.auth.middleware.AuthenticationMiddleware',
188
-
189
- 'django.contrib.messages.middleware.MessageMiddleware',
190
-
191
- 'django.middleware.clickjacking.XFrameOptionsMiddleware',
192
-
193
- 'whitenoise.middleware.WhiteNoiseMiddleware',
194
-
195
-
196
-
197
- ]
198
-
199
-
200
-
201
- ROOT_URLCONF = 'config.urls'
202
-
203
-
204
-
205
- TEMPLATES = [
206
-
207
- {
208
-
209
- 'BACKEND': 'django.template.backends.django.DjangoTemplates',
210
-
211
- 'DIRS': [TEMPLATES_DIR],
212
-
213
- 'APP_DIRS': True,
214
-
215
- 'OPTIONS': {
216
-
217
- 'context_processors': [
218
-
219
- 'django.template.context_processors.debug',
220
-
221
- 'django.template.context_processors.request',
222
-
223
- 'django.contrib.auth.context_processors.auth',
224
-
225
- 'django.contrib.messages.context_processors.messages',
226
-
227
- ],
228
-
229
- },
230
-
231
- },
232
-
233
- ]
234
-
235
-
236
-
237
-
238
-
239
- # Database
240
-
241
- # https://docs.djangoproject.com/en/3.0/ref/settings/#databases
242
-
243
-
244
-
245
- DATABASES = {
246
-
247
- 'default': {
248
-
249
- 'ENGINE': 'django.db.backends.sqlite3',
250
-
251
- 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
252
-
253
- }
254
-
255
- }
256
-
257
-
258
-
259
-
260
-
261
- # Password validation
262
-
263
- # https://docs.djangoproject.com/en/3.0/ref/settings/#auth-password-validators
264
-
265
-
266
-
267
- AUTH_PASSWORD_VALIDATORS = [
268
-
269
- {
270
-
271
- 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
272
-
273
- },
274
-
275
- {
276
-
277
- 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
278
-
279
- },
280
-
281
- {
282
-
283
- 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
284
-
285
- },
286
-
287
- {
288
-
289
- 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
290
-
291
- },
292
-
293
- ]
294
-
295
-
296
-
297
-
298
-
299
- # Internationalization
300
-
301
- # https://docs.djangoproject.com/en/3.0/topics/i18n/
302
-
303
-
304
-
305
- LANGUAGE_CODE = 'en-us'
306
-
307
- TIME_ZONE = 'Asia/Tokyo'
308
-
309
- USE_I18N = True
310
-
311
- USE_L10N = True
312
-
313
- USE_TZ = True
314
-
315
-
316
-
317
-
318
-
319
- # Static files (CSS, JavaScript, Images)
320
-
321
- # https://docs.djangoproject.com/en/3.0/howto/static-files/
322
-
323
-
324
-
325
- STATIC_URL = '/static/'
326
-
327
- STATICFILES_DIRS = [STATIC_DIR]
328
-
329
- MEDIA_URL = '/media/'
330
-
331
- MEDIA_ROOT = os.path.join(ROOT_DIR, '.media')
332
-
333
- STATIC_ROOT = os.path.join(ROOT_DIR, '.static')
334
-
335
-
336
-
337
- STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
338
-
339
-
340
-
341
- ```
342
-
343
-
344
-
345
107
 
346
108
 
347
109
  dev.py
348
110
 
349
111
  ```python
350
-
351
-
352
-
353
- from .base import *
354
-
355
-
356
-
357
- DEBUG = True
358
-
359
- WSGI_APPLICATION = 'config.wsgi.dev.application'
360
-
361
- ALLOWED_HOSTS += [
362
-
363
- 'localhost',
364
-
365
- '127.0.0.1',
366
-
367
- ]
368
-
369
-
370
-
371
- ```
372
-
373
-
374
-
375
- こちらGitHub にならます。
376
-
377
- https://github.com/yasuto-dev/memotter/

3

2021/02/25 15:25

投稿

yayaya22
yayaya22

スコア51

test CHANGED
File without changes
test CHANGED
@@ -96,6 +96,10 @@
96
96
 
97
97
  ```
98
98
 
99
+
100
+
101
+ base.py
102
+
99
103
  ```python
100
104
 
101
105
 
@@ -338,6 +342,10 @@
338
342
 
339
343
 
340
344
 
345
+
346
+
347
+ dev.py
348
+
341
349
  ```python
342
350
 
343
351
 

2

2021/02/25 02:29

投稿

yayaya22
yayaya22

スコア51

test CHANGED
File without changes
test CHANGED
@@ -96,7 +96,7 @@
96
96
 
97
97
  ```
98
98
 
99
- ```base.py
99
+ ```python
100
100
 
101
101
 
102
102
 
@@ -338,7 +338,7 @@
338
338
 
339
339
 
340
340
 
341
- ```dev.py
341
+ ```python
342
342
 
343
343
 
344
344
 

1

2021/02/25 02:28

投稿

yayaya22
yayaya22

スコア51

test CHANGED
File without changes
test CHANGED
@@ -96,6 +96,272 @@
96
96
 
97
97
  ```
98
98
 
99
+ ```base.py
100
+
101
+
102
+
103
+ import os
104
+
105
+
106
+
107
+
108
+
109
+ BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
110
+
111
+ ROOT_DIR = os.path.dirname(BASE_DIR)
112
+
113
+ TEMPLATES_DIR = os.path.join(BASE_DIR, 'templates')
114
+
115
+ STATIC_DIR = os.path.join(BASE_DIR, 'static')
116
+
117
+ SECRET_KEY = '&0j%xa3p@mbir_m03kg*9j9mqri^q#_vmv+=8^n&xs09p&td-1'
118
+
119
+
120
+
121
+ ALLOWED_HOSTS = ["*"]
122
+
123
+
124
+
125
+ ADMIN_USERNAME = 'lhy'
126
+
127
+ ADMIN_PASSWORD = 'pbkdf2_sha256$180000$nMNyyIvw0TgW$BWgVFXrb25VY7+QVURr4/QawrSTbHIksIYzoC3rWyRc='
128
+
129
+ AUTHENTICATION_BACKENDS = [
130
+
131
+ 'django.contrib.auth.backends.ModelBackend',
132
+
133
+ 'config.backends.SettingsBackend',
134
+
135
+ ]
136
+
137
+
138
+
139
+
140
+
141
+ # Application definition
142
+
143
+
144
+
145
+ INSTALLED_APPS = [
146
+
147
+ 'django.contrib.admin',
148
+
149
+ 'django.contrib.auth',
150
+
151
+ 'django.contrib.contenttypes',
152
+
153
+ 'django.contrib.sessions',
154
+
155
+ 'django.contrib.messages',
156
+
157
+ 'django.contrib.staticfiles',
158
+
159
+
160
+
161
+ 'django_extensions',
162
+
163
+ 'django_quill',
164
+
165
+
166
+
167
+ 'posts',
168
+
169
+ ]
170
+
171
+
172
+
173
+ MIDDLEWARE = [
174
+
175
+ 'django.middleware.security.SecurityMiddleware',
176
+
177
+ 'django.contrib.sessions.middleware.SessionMiddleware',
178
+
179
+ 'django.middleware.common.CommonMiddleware',
180
+
181
+ 'django.middleware.csrf.CsrfViewMiddleware',
182
+
183
+ 'django.contrib.auth.middleware.AuthenticationMiddleware',
184
+
185
+ 'django.contrib.messages.middleware.MessageMiddleware',
186
+
187
+ 'django.middleware.clickjacking.XFrameOptionsMiddleware',
188
+
189
+ 'whitenoise.middleware.WhiteNoiseMiddleware',
190
+
191
+
192
+
193
+ ]
194
+
195
+
196
+
197
+ ROOT_URLCONF = 'config.urls'
198
+
199
+
200
+
201
+ TEMPLATES = [
202
+
203
+ {
204
+
205
+ 'BACKEND': 'django.template.backends.django.DjangoTemplates',
206
+
207
+ 'DIRS': [TEMPLATES_DIR],
208
+
209
+ 'APP_DIRS': True,
210
+
211
+ 'OPTIONS': {
212
+
213
+ 'context_processors': [
214
+
215
+ 'django.template.context_processors.debug',
216
+
217
+ 'django.template.context_processors.request',
218
+
219
+ 'django.contrib.auth.context_processors.auth',
220
+
221
+ 'django.contrib.messages.context_processors.messages',
222
+
223
+ ],
224
+
225
+ },
226
+
227
+ },
228
+
229
+ ]
230
+
231
+
232
+
233
+
234
+
235
+ # Database
236
+
237
+ # https://docs.djangoproject.com/en/3.0/ref/settings/#databases
238
+
239
+
240
+
241
+ DATABASES = {
242
+
243
+ 'default': {
244
+
245
+ 'ENGINE': 'django.db.backends.sqlite3',
246
+
247
+ 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
248
+
249
+ }
250
+
251
+ }
252
+
253
+
254
+
255
+
256
+
257
+ # Password validation
258
+
259
+ # https://docs.djangoproject.com/en/3.0/ref/settings/#auth-password-validators
260
+
261
+
262
+
263
+ AUTH_PASSWORD_VALIDATORS = [
264
+
265
+ {
266
+
267
+ 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
268
+
269
+ },
270
+
271
+ {
272
+
273
+ 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
274
+
275
+ },
276
+
277
+ {
278
+
279
+ 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
280
+
281
+ },
282
+
283
+ {
284
+
285
+ 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
286
+
287
+ },
288
+
289
+ ]
290
+
291
+
292
+
293
+
294
+
295
+ # Internationalization
296
+
297
+ # https://docs.djangoproject.com/en/3.0/topics/i18n/
298
+
299
+
300
+
301
+ LANGUAGE_CODE = 'en-us'
302
+
303
+ TIME_ZONE = 'Asia/Tokyo'
304
+
305
+ USE_I18N = True
306
+
307
+ USE_L10N = True
308
+
309
+ USE_TZ = True
310
+
311
+
312
+
313
+
314
+
315
+ # Static files (CSS, JavaScript, Images)
316
+
317
+ # https://docs.djangoproject.com/en/3.0/howto/static-files/
318
+
319
+
320
+
321
+ STATIC_URL = '/static/'
322
+
323
+ STATICFILES_DIRS = [STATIC_DIR]
324
+
325
+ MEDIA_URL = '/media/'
326
+
327
+ MEDIA_ROOT = os.path.join(ROOT_DIR, '.media')
328
+
329
+ STATIC_ROOT = os.path.join(ROOT_DIR, '.static')
330
+
331
+
332
+
333
+ STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
334
+
335
+
336
+
337
+ ```
338
+
339
+
340
+
341
+ ```dev.py
342
+
343
+
344
+
345
+ from .base import *
346
+
347
+
348
+
349
+ DEBUG = True
350
+
351
+ WSGI_APPLICATION = 'config.wsgi.dev.application'
352
+
353
+ ALLOWED_HOSTS += [
354
+
355
+ 'localhost',
356
+
357
+ '127.0.0.1',
358
+
359
+ ]
360
+
361
+
362
+
363
+ ```
364
+
99
365
 
100
366
 
101
367
  こちらGitHub にならます。