質問編集履歴
3
文法の修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -186,10 +186,6 @@
|
|
186
186
|
|
187
187
|
```python
|
188
188
|
|
189
|
-
note_ar1.html
|
190
|
-
|
191
|
-
|
192
|
-
|
193
189
|
{% block content %}
|
194
190
|
|
195
191
|
<body>
|
2
文法の修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -102,10 +102,6 @@
|
|
102
102
|
|
103
103
|
```python
|
104
104
|
|
105
|
-
views.py
|
106
|
-
|
107
|
-
|
108
|
-
|
109
105
|
from django.shortcuts import render, redirect
|
110
106
|
|
111
107
|
from django.views import generic
|
@@ -164,11 +160,7 @@
|
|
164
160
|
|
165
161
|
```
|
166
162
|
|
167
|
-
```
|
163
|
+
```python
|
168
|
-
|
169
|
-
urls.py
|
170
|
-
|
171
|
-
|
172
164
|
|
173
165
|
from django.urls import path
|
174
166
|
|
@@ -178,8 +170,6 @@
|
|
178
170
|
|
179
171
|
|
180
172
|
|
181
|
-
|
182
|
-
|
183
173
|
app_name = 'notes'
|
184
174
|
|
185
175
|
|
@@ -194,7 +184,7 @@
|
|
194
184
|
|
195
185
|
```
|
196
186
|
|
197
|
-
```
|
187
|
+
```python
|
198
188
|
|
199
189
|
note_ar1.html
|
200
190
|
|
1
tracebackを追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -6,6 +6,8 @@
|
|
6
6
|
|
7
7
|
いいね機能実装中に詰まりました
|
8
8
|
|
9
|
+
該当のページを開くとNoReverseMatch at /notes/ar1/と表示されてしまいます。
|
10
|
+
|
9
11
|
|
10
12
|
|
11
13
|
### 発生している問題・エラーメッセージ
|
@@ -14,6 +16,80 @@
|
|
14
16
|
|
15
17
|
```
|
16
18
|
|
19
|
+
Traceback (most recent call last):
|
20
|
+
|
21
|
+
File "/Users/yoshihiro/.local/share/virtualenvs/mysite-xs0jetOT/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
|
22
|
+
|
23
|
+
response = get_response(request)
|
24
|
+
|
25
|
+
File "/Users/yoshihiro/.local/share/virtualenvs/mysite-xs0jetOT/lib/python3.8/site-packages/django/core/handlers/base.py", line 179, in _get_response
|
26
|
+
|
27
|
+
response = wrapped_callback(request, *callback_args, **callback_kwargs)
|
28
|
+
|
29
|
+
File "/Users/yoshihiro/Desktop/HBGB/mysite/notes/views.py", line 37, in note_ar1
|
30
|
+
|
31
|
+
return render(request,'notes/note_ar1.html',{'notes': notes})
|
32
|
+
|
33
|
+
File "/Users/yoshihiro/.local/share/virtualenvs/mysite-xs0jetOT/lib/python3.8/site-packages/django/shortcuts.py", line 19, in render
|
34
|
+
|
35
|
+
content = loader.render_to_string(template_name, context, request, using=using)
|
36
|
+
|
37
|
+
File "/Users/yoshihiro/.local/share/virtualenvs/mysite-xs0jetOT/lib/python3.8/site-packages/django/template/loader.py", line 62, in render_to_string
|
38
|
+
|
39
|
+
return template.render(context, request)
|
40
|
+
|
41
|
+
File "/Users/yoshihiro/.local/share/virtualenvs/mysite-xs0jetOT/lib/python3.8/site-packages/django/template/backends/django.py", line 61, in render
|
42
|
+
|
43
|
+
return self.template.render(context)
|
44
|
+
|
45
|
+
File "/Users/yoshihiro/.local/share/virtualenvs/mysite-xs0jetOT/lib/python3.8/site-packages/django/template/base.py", line 170, in render
|
46
|
+
|
47
|
+
return self._render(context)
|
48
|
+
|
49
|
+
File "/Users/yoshihiro/.local/share/virtualenvs/mysite-xs0jetOT/lib/python3.8/site-packages/django/template/base.py", line 162, in _render
|
50
|
+
|
51
|
+
return self.nodelist.render(context)
|
52
|
+
|
53
|
+
File "/Users/yoshihiro/.local/share/virtualenvs/mysite-xs0jetOT/lib/python3.8/site-packages/django/template/base.py", line 938, in render
|
54
|
+
|
55
|
+
bit = node.render_annotated(context)
|
56
|
+
|
57
|
+
File "/Users/yoshihiro/.local/share/virtualenvs/mysite-xs0jetOT/lib/python3.8/site-packages/django/template/base.py", line 905, in render_annotated
|
58
|
+
|
59
|
+
return self.render(context)
|
60
|
+
|
61
|
+
File "/Users/yoshihiro/.local/share/virtualenvs/mysite-xs0jetOT/lib/python3.8/site-packages/django/template/loader_tags.py", line 53, in render
|
62
|
+
|
63
|
+
result = self.nodelist.render(context)
|
64
|
+
|
65
|
+
File "/Users/yoshihiro/.local/share/virtualenvs/mysite-xs0jetOT/lib/python3.8/site-packages/django/template/base.py", line 938, in render
|
66
|
+
|
67
|
+
bit = node.render_annotated(context)
|
68
|
+
|
69
|
+
File "/Users/yoshihiro/.local/share/virtualenvs/mysite-xs0jetOT/lib/python3.8/site-packages/django/template/base.py", line 905, in render_annotated
|
70
|
+
|
71
|
+
return self.render(context)
|
72
|
+
|
73
|
+
File "/Users/yoshihiro/.local/share/virtualenvs/mysite-xs0jetOT/lib/python3.8/site-packages/django/template/defaulttags.py", line 211, in render
|
74
|
+
|
75
|
+
nodelist.append(node.render_annotated(context))
|
76
|
+
|
77
|
+
File "/Users/yoshihiro/.local/share/virtualenvs/mysite-xs0jetOT/lib/python3.8/site-packages/django/template/base.py", line 905, in render_annotated
|
78
|
+
|
79
|
+
return self.render(context)
|
80
|
+
|
81
|
+
File "/Users/yoshihiro/.local/share/virtualenvs/mysite-xs0jetOT/lib/python3.8/site-packages/django/template/defaulttags.py", line 446, in render
|
82
|
+
|
83
|
+
url = reverse(view_name, args=args, kwargs=kwargs, current_app=current_app)
|
84
|
+
|
85
|
+
File "/Users/yoshihiro/.local/share/virtualenvs/mysite-xs0jetOT/lib/python3.8/site-packages/django/urls/base.py", line 87, in reverse
|
86
|
+
|
87
|
+
return iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs))
|
88
|
+
|
89
|
+
File "/Users/yoshihiro/.local/share/virtualenvs/mysite-xs0jetOT/lib/python3.8/site-packages/django/urls/resolvers.py", line 685, in _reverse_with_prefix
|
90
|
+
|
91
|
+
raise NoReverseMatch(msg)
|
92
|
+
|
17
93
|
django.urls.exceptions.NoReverseMatch: Reverse for 'like' not found. 'like' is not a valid view function or pattern name.
|
18
94
|
|
19
95
|
```
|
@@ -26,8 +102,6 @@
|
|
26
102
|
|
27
103
|
```python
|
28
104
|
|
29
|
-
```
|
30
|
-
|
31
105
|
views.py
|
32
106
|
|
33
107
|
|
@@ -155,19 +229,3 @@
|
|
155
229
|
{% endblock %}
|
156
230
|
|
157
231
|
```
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
### 試したこと
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
ネット上で色々調べてみましたが解決できませんでした
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
### 補足情報(FW/ツールのバージョンなど)
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
ここにより詳細な情報を記載してください。
|