質問編集履歴

5

スクショを添付

2020/12/22 14:19

投稿

Shirona
Shirona

スコア2

test CHANGED
File without changes
test CHANGED
@@ -331,3 +331,5 @@
331
331
 
332
332
 
333
333
  ```
334
+
335
+ ![![イメージ説明](34e9d4fd42a2adc4594bdd0ed5c61aa7.png)]

4

事象を追加

2020/12/22 14:19

投稿

Shirona
Shirona

スコア2

test CHANGED
File without changes
test CHANGED
@@ -2,7 +2,11 @@
2
2
 
3
3
  Djangoのフレームワークを用いてサイトを作成中です。
4
4
 
5
- Bodyが表示できない状態です。
5
+ Header,Bodyが表示できない状態です。
6
+
7
+ static のロードができていない?
8
+
9
+
6
10
 
7
11
  ### 該当のソースコード
8
12
 

3

setting.pyを追記

2020/12/20 03:13

投稿

Shirona
Shirona

スコア2

test CHANGED
File without changes
test CHANGED
@@ -4,8 +4,6 @@
4
4
 
5
5
  Bodyが表示できない状態です。
6
6
 
7
-
8
-
9
7
  ### 該当のソースコード
10
8
 
11
9
  ```html
@@ -293,3 +291,39 @@
293
291
  {% endblock %}
294
292
 
295
293
  ```
294
+
295
+ ```python
296
+
297
+ TEMPLATES = [
298
+
299
+ {
300
+
301
+ 'BACKEND': 'django.template.backends.django.DjangoTemplates',
302
+
303
+ 'DIRS': [],
304
+
305
+ 'APP_DIRS': True,
306
+
307
+ 'OPTIONS': {
308
+
309
+ 'context_processors': [
310
+
311
+ 'django.template.context_processors.debug',
312
+
313
+ 'django.template.context_processors.request',
314
+
315
+ 'django.contrib.auth.context_processors.auth',
316
+
317
+ 'django.contrib.messages.context_processors.messages',
318
+
319
+ ],
320
+
321
+ },
322
+
323
+ },
324
+
325
+ ]
326
+
327
+
328
+
329
+ ```

2

エラーコードは消えましたがbase.htmlが読み込まれません

2020/12/06 06:27

投稿

Shirona
Shirona

スコア2

test CHANGED
File without changes
test CHANGED
@@ -6,328 +6,290 @@
6
6
 
7
7
 
8
8
 
9
- ### 発生している問題・エラメッセ
10
-
11
-
9
+ ### 該当のソスコ
10
+
11
+ ```html
12
+
13
+ {% load static %}
14
+
15
+ <html lang="ja">
16
+
17
+
18
+
19
+ <head>
20
+
21
+ <meta charset="utf-8">
22
+
23
+ <meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
24
+
25
+ <meta name="description" content="">
26
+
27
+ <meta name="author" content="">
28
+
29
+
30
+
31
+ <title>{% block title %}{% endblock %}</title>
32
+
33
+
34
+
35
+ <!-- Booststrap core CSS-->
36
+
37
+ <link href="{% static 'vendor/bootstrap/css/bootstrap.min.css' %}" rel="stylesheet">
38
+
39
+ <!--Custom font for this template-->
40
+
41
+ <link href="https://fonts.googleapis.com/css?familiy=Catamaran:100,200,300,300i,400,700,700i,900,900i" rel="stylesheet">
42
+
43
+ <link href="https://fonts.googleapis.com/css?familiy=Lato:100,200,300,300i,400,700,700i,900,900i" rel="stylesheet">
44
+
45
+ <!--Custom styles for this template-->
46
+
47
+ <link href="{% static 'css/one-page-wonder.min.css' %}">
48
+
49
+ <!-- My style -->
50
+
51
+ <link rel="stylesheet" type="text/css" href="{% static 'css/mystyle.css' %">
52
+
53
+ {% block head %}{% endblock %}
54
+
55
+ </head>
56
+
57
+ <body>
58
+
59
+ <div id ="wrapper">
60
+
61
+ <!--Navigation-->
62
+
63
+ <nav class="navbar-expand-lg navbar-dark navbar-customfixed-top">
64
+
65
+ <div class ="container">
66
+
67
+ <a class="navbar-brand" href="{% url 'diary:index' %}">BLOG</a>
68
+
69
+ <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar-Responsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
70
+
71
+ <span class="nabar-toggler-icon"></span>
72
+
73
+ </button>
74
+
75
+ <div class ="collapse navbar-collaspe" id="navbarResponsive">
76
+
77
+ <ul class="navbar-nav mr-auto">
78
+
79
+ <li class="nav-item{% block active_inquiry %}{% endblock%}">
80
+
81
+ <a class="nav-link" href="{% url 'diary:inquiry'%}">INQUIRY</a>
82
+
83
+ </li>
84
+
85
+ </ul>
86
+
87
+ <ul class ="navbar-nav ml-auto">
88
+
89
+ <li class ="nav-item">
90
+
91
+ <a class="nav-link" href="#">SignUp</a>
92
+
93
+ </li>
94
+
95
+ <li class="nav-item">
96
+
97
+ <a class="nav-link" href="#">Login</a>
98
+
99
+ </li>
100
+
101
+ </ul>
102
+
103
+ </div>
104
+
105
+ </div>
106
+
107
+ </nav>
108
+
109
+ {% block header%}{% endblock %}
110
+
111
+ {% block contents%}{% endblock %}
112
+
113
+ <!--Footer-->
114
+
115
+ <footer class="py-5 bg-block">
116
+
117
+ <div class="container">
118
+
119
+ <p class="m-0 text-center text-white small">Copylight &copy;Blog</p>
120
+
121
+ </div>
122
+
123
+ <!-- /.container -->
124
+
125
+ </footer>
126
+
127
+
128
+
129
+ <!-- Bootstrap core Javascript -->
130
+
131
+ <script src="{% static 'vender/jquery/jquery.min.js'%}"></script>
132
+
133
+ <script src="{% static 'vender/bootstrap/js/bootstrap.bundle.min.js'%}"></script>
134
+
135
+ </div>
136
+
137
+ </body>
138
+
139
+ </html>
12
140
 
13
141
  ```
14
142
 
15
- エラーメッセージ
16
-
17
- Not Found: /{% static 'css/mystyle.css' %
18
-
19
- "GET /static/vender/jquery/jquery.min.js HTTP/1.1" 404 1707
20
-
21
- "GET /static/vender/bootstrap/js/bootstrap.bundle.min.js HTTP/1.1" 404 1755
22
-
23
- "GET /%7B%%20static%20'css/mystyle.css'%20% HTTP/1.1" 404 2407
24
-
25
- "GET /static/vender/bootstrap/js/bootstrap.bundle.min.js HTTP/1.1" 404 1755
26
-
27
- Not Found: /{% static 'css/mystyle.css' %
28
-
29
- "GET /%7B%%20static%20'css/mystyle.css'%20% HTTP/1.1" 404 2407
30
-
31
- Not Found: /{% static 'css/mystyle.css' %
32
-
33
- "GET /%7B%%20static%20'css/mystyle.css'%20% HTTP/1.1" 404 2407
34
-
35
- ----------------------------------------
36
-
37
- Exception happened during processing of request from ('127.0.0.1', 62512)
38
-
39
- "GET /static/vender/jquery/jquery.min.js HTTP/1.1" 404 1707
40
-
41
- "GET /static/vender/bootstrap/js/bootstrap.bundle.min.js HTTP/1.1" 404 1755
42
-
43
- Traceback (most recent call last):
143
+
144
+
145
+ ```html
146
+
147
+
148
+
149
+ {% extends 'base.html' %}
150
+
151
+ {% load static %}
152
+
153
+ {% block title %}Web上で質問や悩みを投稿できるサービス|Akilog{% endblock %}
154
+
155
+ {% block header%}
156
+
157
+ <header class="masthead text-center text-while">
158
+
159
+ <div class="masthead-content">
160
+
161
+ <div class="container">
162
+
163
+ <h1 class="masthead-heading mb-0">Akilog</h1>
164
+
165
+ <h2 class="masthead-subheading mb-0">質問投稿フォーラム</h2>
166
+
167
+ <a href="#" class="btn btn-primary btn-xl rounded-pillmt-5">Login</a>
168
+
169
+ </div>
170
+
171
+ </div>
172
+
173
+ <div class="bg-circle-1 bg-circle"></div>
174
+
175
+ <div class="bg-circle-2 bg-circle"></div>
176
+
177
+ <div class="bg-circle-3 bg-circle"></div>
178
+
179
+ <div class="bg-circle-4 bg-circle"></div>
180
+
181
+ </header>
182
+
183
+ {% endblock %}
184
+
185
+ {% block contents %}
186
+
187
+ <section>
188
+
189
+ <div class="container">
190
+
191
+ <div class="row align-items-center">
192
+
193
+ <div class="col-lg-6 order-lg-2">
194
+
195
+ <div class="p-5">
196
+
197
+ <img class="img-fluid rounded-circle" src="{% static 'img/01.jpg' %}" alt="">
198
+
199
+ </div>
200
+
201
+ </div>
202
+
203
+ <div class="col-lg-6 order-lg-1">
204
+
205
+ <div class="p-5">
206
+
207
+ <h2 class="display-4">Forum</h2>
208
+
209
+ <p>WEB上で編集/作成/削除まで可能</p>
210
+
211
+ </div>
212
+
213
+ </div>
214
+
215
+ </div>
216
+
217
+ </div>
218
+
219
+ </section>
220
+
221
+
222
+
223
+ <section>
224
+
225
+ <div class="container">
226
+
227
+ <div class="row align-items-center">
228
+
229
+ <div class="col-lg-6">
230
+
231
+ <div class="p-5">
232
+
233
+ <img class="img-fluid rounded-circle" src="{% static 'img/02.jpg' %}" alt="">
234
+
235
+ </div>
236
+
237
+ </div>
238
+
239
+ <div class="col-lg-6">
240
+
241
+ <div class="p-5">
242
+
243
+ <h2 class="display-4">Save your Forum</h2>
244
+
245
+ <p>あなたの投稿を保存</p>
246
+
247
+ </div>
248
+
249
+ </div>
250
+
251
+ </div>
252
+
253
+ </div>
254
+
255
+ </section>
256
+
257
+
258
+
259
+ <section>
260
+
261
+ <div class="container">
262
+
263
+ <div class="row align-items-center">
264
+
265
+ <div class="col-lg-6 order-lg-2">
266
+
267
+ <div class="p-5">
268
+
269
+ <img class="img-fluid rounded-circle" src="{% static 'img/03.jpg' %}" alt="">
270
+
271
+ </div>
272
+
273
+ </div>
274
+
275
+ <div class="col-lg-6 order-lg-1">
276
+
277
+ <div class="p-5">
278
+
279
+ <h2 class="display-4">Membership System</h2>
280
+
281
+ <p>会員専用ページ</p>
282
+
283
+ </div>
284
+
285
+ </div>
286
+
287
+ </div>
288
+
289
+ </div>
290
+
291
+ </section>
292
+
293
+ {% endblock %}
44
294
 
45
295
  ```
46
-
47
- ### 該当のソースコード
48
-
49
- ```html
50
-
51
- {% load static %}
52
-
53
- <html lang="ja">
54
-
55
-
56
-
57
- <head>
58
-
59
- <meta charset="utf-8">
60
-
61
- <meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
62
-
63
- <meta name="description" content="">
64
-
65
- <meta name="author" content="">
66
-
67
-
68
-
69
- <title>{% block title %}{% endblock %}</title>
70
-
71
-
72
-
73
- <!-- Booststrap core CSS-->
74
-
75
- <link href="{% static 'vendor/bootstrap/css/bootstrap.min.css' %}" rel="stylesheet">
76
-
77
- <!--Custom font for this template-->
78
-
79
- <link href="https://fonts.googleapis.com/css?familiy=Catamaran:100,200,300,300i,400,700,700i,900,900i" rel="stylesheet">
80
-
81
- <link href="https://fonts.googleapis.com/css?familiy=Lato:100,200,300,300i,400,700,700i,900,900i" rel="stylesheet">
82
-
83
- <!--Custom styles for this template-->
84
-
85
- <link href="{% static 'css/one-page-wonder.min.css' %}">
86
-
87
- <!-- My style -->
88
-
89
- <link rel="stylesheet" type="text/css" href="{% static 'css/mystyle.css' %">
90
-
91
- {% block head %}{% endblock %}
92
-
93
- </head>
94
-
95
- <body>
96
-
97
- <div id ="wrapper">
98
-
99
- <!--Navigation-->
100
-
101
- <nav class="navbar-expand-lg navbar-dark navbar-customfixed-top">
102
-
103
- <div class ="container">
104
-
105
- <a class="navbar-brand" href="{% url 'diary:index' %}">BLOG</a>
106
-
107
- <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar-Responsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
108
-
109
- <span class="nabar-toggler-icon"></span>
110
-
111
- </button>
112
-
113
- <div class ="collapse navbar-collaspe" id="navbarResponsive">
114
-
115
- <ul class="navbar-nav mr-auto">
116
-
117
- <li class="nav-item{% block active_inquiry %}{% endblock%}">
118
-
119
- <a class="nav-link" href="{% url 'diary:inquiry'%}">INQUIRY</a>
120
-
121
- </li>
122
-
123
- </ul>
124
-
125
- <ul class ="navbar-nav ml-auto">
126
-
127
- <li class ="nav-item">
128
-
129
- <a class="nav-link" href="#">SignUp</a>
130
-
131
- </li>
132
-
133
- <li class="nav-item">
134
-
135
- <a class="nav-link" href="#">Login</a>
136
-
137
- </li>
138
-
139
- </ul>
140
-
141
- </div>
142
-
143
- </div>
144
-
145
- </nav>
146
-
147
- {% block header%}{% endblock %}
148
-
149
- {% block contents%}{% endblock %}
150
-
151
- <!--Footer-->
152
-
153
- <footer class="py-5 bg-block">
154
-
155
- <div class="container">
156
-
157
- <p class="m-0 text-center text-white small">Copylight &copy;Blog</p>
158
-
159
- </div>
160
-
161
- <!-- /.container -->
162
-
163
- </footer>
164
-
165
-
166
-
167
- <!-- Bootstrap core Javascript -->
168
-
169
- <script src="{% static 'vender/jquery/jquery.min.js'%}"></script>
170
-
171
- <script src="{% static 'vender/bootstrap/js/bootstrap.bundle.min.js'%}"></script>
172
-
173
- </div>
174
-
175
- </body>
176
-
177
- </html>
178
-
179
- ```
180
-
181
-
182
-
183
- ```html
184
-
185
-
186
-
187
- {% extends 'base.html' %}
188
-
189
- {% load static %}
190
-
191
- {% block title %}Web上で質問や悩みを投稿できるサービス|Akilog{% endblock %}
192
-
193
- {% block header%}
194
-
195
- <header class="masthead text-center text-while">
196
-
197
- <div class="masthead-content">
198
-
199
- <div class="container">
200
-
201
- <h1 class="masthead-heading mb-0">Akilog</h1>
202
-
203
- <h2 class="masthead-subheading mb-0">質問投稿フォーラム</h2>
204
-
205
- <a href="#" class="btn btn-primary btn-xl rounded-pillmt-5">Login</a>
206
-
207
- </div>
208
-
209
- </div>
210
-
211
- <div class="bg-circle-1 bg-circle"></div>
212
-
213
- <div class="bg-circle-2 bg-circle"></div>
214
-
215
- <div class="bg-circle-3 bg-circle"></div>
216
-
217
- <div class="bg-circle-4 bg-circle"></div>
218
-
219
- </header>
220
-
221
- {% endblock %}
222
-
223
- {% block contents %}
224
-
225
- <section>
226
-
227
- <div class="container">
228
-
229
- <div class="row align-items-center">
230
-
231
- <div class="col-lg-6 order-lg-2">
232
-
233
- <div class="p-5">
234
-
235
- <img class="img-fluid rounded-circle" src="{% static 'img/01.jpg' %}" alt="">
236
-
237
- </div>
238
-
239
- </div>
240
-
241
- <div class="col-lg-6 order-lg-1">
242
-
243
- <div class="p-5">
244
-
245
- <h2 class="display-4">Forum</h2>
246
-
247
- <p>WEB上で編集/作成/削除まで可能</p>
248
-
249
- </div>
250
-
251
- </div>
252
-
253
- </div>
254
-
255
- </div>
256
-
257
- </section>
258
-
259
-
260
-
261
- <section>
262
-
263
- <div class="container">
264
-
265
- <div class="row align-items-center">
266
-
267
- <div class="col-lg-6">
268
-
269
- <div class="p-5">
270
-
271
- <img class="img-fluid rounded-circle" src="{% static 'img/02.jpg' %}" alt="">
272
-
273
- </div>
274
-
275
- </div>
276
-
277
- <div class="col-lg-6">
278
-
279
- <div class="p-5">
280
-
281
- <h2 class="display-4">Save your Forum</h2>
282
-
283
- <p>あなたの投稿を保存</p>
284
-
285
- </div>
286
-
287
- </div>
288
-
289
- </div>
290
-
291
- </div>
292
-
293
- </section>
294
-
295
-
296
-
297
- <section>
298
-
299
- <div class="container">
300
-
301
- <div class="row align-items-center">
302
-
303
- <div class="col-lg-6 order-lg-2">
304
-
305
- <div class="p-5">
306
-
307
- <img class="img-fluid rounded-circle" src="{% static 'img/03.jpg' %}" alt="">
308
-
309
- </div>
310
-
311
- </div>
312
-
313
- <div class="col-lg-6 order-lg-1">
314
-
315
- <div class="p-5">
316
-
317
- <h2 class="display-4">Membership System</h2>
318
-
319
- <p>会員専用ページ</p>
320
-
321
- </div>
322
-
323
- </div>
324
-
325
- </div>
326
-
327
- </div>
328
-
329
- </section>
330
-
331
- {% endblock %}
332
-
333
- ```

1

エラーコードを追記

2020/12/06 01:45

投稿

Shirona
Shirona

スコア2

test CHANGED
File without changes
test CHANGED
@@ -14,14 +14,38 @@
14
14
 
15
15
  エラーメッセージ
16
16
 
17
+ Not Found: /{% static 'css/mystyle.css' %
18
+
19
+ "GET /static/vender/jquery/jquery.min.js HTTP/1.1" 404 1707
20
+
21
+ "GET /static/vender/bootstrap/js/bootstrap.bundle.min.js HTTP/1.1" 404 1755
22
+
23
+ "GET /%7B%%20static%20'css/mystyle.css'%20% HTTP/1.1" 404 2407
24
+
25
+ "GET /static/vender/bootstrap/js/bootstrap.bundle.min.js HTTP/1.1" 404 1755
26
+
27
+ Not Found: /{% static 'css/mystyle.css' %
28
+
29
+ "GET /%7B%%20static%20'css/mystyle.css'%20% HTTP/1.1" 404 2407
30
+
31
+ Not Found: /{% static 'css/mystyle.css' %
32
+
33
+ "GET /%7B%%20static%20'css/mystyle.css'%20% HTTP/1.1" 404 2407
34
+
35
+ ----------------------------------------
36
+
37
+ Exception happened during processing of request from ('127.0.0.1', 62512)
38
+
39
+ "GET /static/vender/jquery/jquery.min.js HTTP/1.1" 404 1707
40
+
41
+ "GET /static/vender/bootstrap/js/bootstrap.bundle.min.js HTTP/1.1" 404 1755
42
+
43
+ Traceback (most recent call last):
44
+
17
45
  ```
18
46
 
19
-
20
-
21
47
  ### 該当のソースコード
22
48
 
23
-
24
-
25
49
  ```html
26
50
 
27
51
  {% load static %}
@@ -50,22 +74,16 @@
50
74
 
51
75
  <link href="{% static 'vendor/bootstrap/css/bootstrap.min.css' %}" rel="stylesheet">
52
76
 
53
-
54
-
55
77
  <!--Custom font for this template-->
56
78
 
57
79
  <link href="https://fonts.googleapis.com/css?familiy=Catamaran:100,200,300,300i,400,700,700i,900,900i" rel="stylesheet">
58
80
 
59
81
  <link href="https://fonts.googleapis.com/css?familiy=Lato:100,200,300,300i,400,700,700i,900,900i" rel="stylesheet">
60
82
 
61
-
62
-
63
83
  <!--Custom styles for this template-->
64
84
 
65
85
  <link href="{% static 'css/one-page-wonder.min.css' %}">
66
86
 
67
-
68
-
69
87
  <!-- My style -->
70
88
 
71
89
  <link rel="stylesheet" type="text/css" href="{% static 'css/mystyle.css' %">
@@ -74,8 +92,6 @@
74
92
 
75
93
  </head>
76
94
 
77
-
78
-
79
95
  <body>
80
96
 
81
97
  <div id ="wrapper">
@@ -94,8 +110,6 @@
94
110
 
95
111
  </button>
96
112
 
97
-
98
-
99
113
  <div class ="collapse navbar-collaspe" id="navbarResponsive">
100
114
 
101
115
  <ul class="navbar-nav mr-auto">
@@ -132,12 +146,8 @@
132
146
 
133
147
  {% block header%}{% endblock %}
134
148
 
135
-
136
-
137
149
  {% block contents%}{% endblock %}
138
150
 
139
-
140
-
141
151
  <!--Footer-->
142
152
 
143
153
  <footer class="py-5 bg-block">
@@ -176,20 +186,12 @@
176
186
 
177
187
  {% extends 'base.html' %}
178
188
 
179
-
180
-
181
189
  {% load static %}
182
190
 
183
-
184
-
185
191
  {% block title %}Web上で質問や悩みを投稿できるサービス|Akilog{% endblock %}
186
192
 
187
-
188
-
189
193
  {% block header%}
190
194
 
191
-
192
-
193
195
  <header class="masthead text-center text-while">
194
196
 
195
197
  <div class="masthead-content">
@@ -218,8 +220,6 @@
218
220
 
219
221
  {% endblock %}
220
222
 
221
-
222
-
223
223
  {% block contents %}
224
224
 
225
225
  <section>
@@ -330,16 +330,4 @@
330
330
 
331
331
  {% endblock %}
332
332
 
333
-
334
-
335
-
336
-
337
333
  ```
338
-
339
-
340
-
341
-
342
-
343
-
344
-
345
- ここにより詳細な情報を記載してください。