質問編集履歴
4
topics.html追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -18,7 +18,7 @@
|
|
18
18
|
|
19
19
|
|
20
20
|
|
21
|
-
```topichtml
|
21
|
+
```topicshtml
|
22
22
|
|
23
23
|
{% extends "learning_logs/base.html" %}
|
24
24
|
|
3
エラー分の追加、urls.pyの追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,4 +1,10 @@
|
|
1
|
+
> Error during template rendering
|
2
|
+
|
3
|
+
In template /Users/furukawataichi/learning_log/learning_logs/templates/learning_logs/topics.html, error at line 17
|
4
|
+
|
1
5
|
Reverse for 'new_topic.html' not found. 'new_topic.html' is not a valid view function or pattern name.
|
6
|
+
|
7
|
+
|
2
8
|
|
3
9
|
というエラーが出てしまいました。
|
4
10
|
|
@@ -6,13 +12,13 @@
|
|
6
12
|
|
7
13
|
|
8
14
|
|
9
|
-
topics.htmlの17行目にエラーが出ています。
|
15
|
+
topics.htmlの17行目(下から2行目の<a></a>です)にエラーが出ています。
|
10
16
|
|
11
17
|
|
12
18
|
|
13
19
|
|
14
20
|
|
15
|
-
```topic
|
21
|
+
```topichtml
|
16
22
|
|
17
23
|
{% extends "learning_logs/base.html" %}
|
18
24
|
|
@@ -56,7 +62,7 @@
|
|
56
62
|
|
57
63
|
|
58
64
|
|
59
|
-
```newtopic
|
65
|
+
```newtopichtml
|
60
66
|
|
61
67
|
{% extends "learning_logs/base.html" %}
|
62
68
|
|
@@ -83,3 +89,47 @@
|
|
83
89
|
{% endblock content %}
|
84
90
|
|
85
91
|
```
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
```urlspy
|
96
|
+
|
97
|
+
#learning_logsのURLパターンの定義
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
from django.urls import path
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
from . import views
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
app_name = 'learning_logs'
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
urlpatterns = [
|
114
|
+
|
115
|
+
#ホームページ
|
116
|
+
|
117
|
+
path('',views.index,name='index'),
|
118
|
+
|
119
|
+
#全てのトピックを表示するページ
|
120
|
+
|
121
|
+
path('topics/',views.topics,name='topics'),
|
122
|
+
|
123
|
+
#個別トピックの詳細ページ
|
124
|
+
|
125
|
+
path('topics/<int:topic_id>/',views.topic,name='topic'),
|
126
|
+
|
127
|
+
#新規トピックの追加ページ
|
128
|
+
|
129
|
+
path('new_topic/',views.new_topic,name='new_topic'),
|
130
|
+
|
131
|
+
]
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
```
|
2
誤字がありました
test
CHANGED
File without changes
|
test
CHANGED
@@ -56,7 +56,7 @@
|
|
56
56
|
|
57
57
|
|
58
58
|
|
59
|
-
```new
|
59
|
+
```newtopic
|
60
60
|
|
61
61
|
{% extends "learning_logs/base.html" %}
|
62
62
|
|
1
一つ目のコードがtopic.html。2つ目のコードがnew_topic.htmlです。
test
CHANGED
File without changes
|
test
CHANGED
@@ -10,7 +10,9 @@
|
|
10
10
|
|
11
11
|
|
12
12
|
|
13
|
+
|
14
|
+
|
13
|
-
```topic
|
15
|
+
```topic
|
14
16
|
|
15
17
|
{% extends "learning_logs/base.html" %}
|
16
18
|
|
@@ -54,7 +56,7 @@
|
|
54
56
|
|
55
57
|
|
56
58
|
|
57
|
-
```new
|
59
|
+
```new topic
|
58
60
|
|
59
61
|
{% extends "learning_logs/base.html" %}
|
60
62
|
|