質問編集履歴
4
topics.html追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
topics.htmlの17行目(下から2行目の<a></a>です)にエラーが出ています。
|
9
9
|
|
10
10
|
|
11
|
-
```
|
11
|
+
```topicshtml
|
12
12
|
{% extends "learning_logs/base.html" %}
|
13
13
|
|
14
14
|
{% block content %}
|
3
エラー分の追加、urls.pyの追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,11 +1,14 @@
|
|
1
|
+
> Error during template rendering
|
2
|
+
In template /Users/furukawataichi/learning_log/learning_logs/templates/learning_logs/topics.html, error at line 17
|
1
3
|
Reverse for 'new_topic.html' not found. 'new_topic.html' is not a valid view function or pattern name.
|
4
|
+
|
2
5
|
というエラーが出てしまいました。
|
3
6
|
いろいろ調べてみたのですが、原因がわかりません。
|
4
7
|
|
5
|
-
topics.htmlの17行目にエラーが出ています。
|
8
|
+
topics.htmlの17行目(下から2行目の<a></a>です)にエラーが出ています。
|
6
9
|
|
7
10
|
|
8
|
-
```
|
11
|
+
```topichtml
|
9
12
|
{% extends "learning_logs/base.html" %}
|
10
13
|
|
11
14
|
{% block content %}
|
@@ -27,7 +30,7 @@
|
|
27
30
|
{% endblock content %}
|
28
31
|
```
|
29
32
|
|
30
|
-
```
|
33
|
+
```newtopichtml
|
31
34
|
{% extends "learning_logs/base.html" %}
|
32
35
|
|
33
36
|
{% block content %}
|
@@ -40,4 +43,26 @@
|
|
40
43
|
</form>
|
41
44
|
|
42
45
|
{% endblock content %}
|
46
|
+
```
|
47
|
+
|
48
|
+
```urlspy
|
49
|
+
#learning_logsのURLパターンの定義
|
50
|
+
|
51
|
+
from django.urls import path
|
52
|
+
|
53
|
+
from . import views
|
54
|
+
|
55
|
+
app_name = 'learning_logs'
|
56
|
+
|
57
|
+
urlpatterns = [
|
58
|
+
#ホームページ
|
59
|
+
path('',views.index,name='index'),
|
60
|
+
#全てのトピックを表示するページ
|
61
|
+
path('topics/',views.topics,name='topics'),
|
62
|
+
#個別トピックの詳細ページ
|
63
|
+
path('topics/<int:topic_id>/',views.topic,name='topic'),
|
64
|
+
#新規トピックの追加ページ
|
65
|
+
path('new_topic/',views.new_topic,name='new_topic'),
|
66
|
+
]
|
67
|
+
|
43
68
|
```
|
2
誤字がありました
title
CHANGED
File without changes
|
body
CHANGED
@@ -27,7 +27,7 @@
|
|
27
27
|
{% endblock content %}
|
28
28
|
```
|
29
29
|
|
30
|
-
```
|
30
|
+
```newtopic
|
31
31
|
{% extends "learning_logs/base.html" %}
|
32
32
|
|
33
33
|
{% block content %}
|
1
一つ目のコードがtopic.html。2つ目のコードがnew_topic.htmlです。
title
CHANGED
File without changes
|
body
CHANGED
@@ -4,7 +4,8 @@
|
|
4
4
|
|
5
5
|
topics.htmlの17行目にエラーが出ています。
|
6
6
|
|
7
|
+
|
7
|
-
```
|
8
|
+
```topic
|
8
9
|
{% extends "learning_logs/base.html" %}
|
9
10
|
|
10
11
|
{% block content %}
|
@@ -26,7 +27,7 @@
|
|
26
27
|
{% endblock content %}
|
27
28
|
```
|
28
29
|
|
29
|
-
```
|
30
|
+
```new topic
|
30
31
|
{% extends "learning_logs/base.html" %}
|
31
32
|
|
32
33
|
{% block content %}
|