回答編集履歴
1
説明を追記しました。
test
CHANGED
@@ -10,18 +10,18 @@
|
|
10
10
|
|
11
11
|
```python
|
12
12
|
|
13
|
-
from django.contrib.auth.mixins import LoginRequiredMixin
|
13
|
+
from django.contrib.auth.mixins import LoginRequiredMixin # 追加
|
14
14
|
|
15
15
|
|
16
16
|
|
17
|
-
class TodoList(FilterView):
|
17
|
+
class TodoList(LoginRequiredMixin, FilterView): # LoginRequiredMixin, を追加
|
18
|
-
|
19
|
-
class TodoCreate(CreateView):
|
20
18
|
|
21
19
|
|
22
20
|
|
23
|
-
class Todo
|
21
|
+
class TodoCreate(LoginRequiredMixin, CreateView): # LoginRequiredMixin, を追加
|
24
22
|
|
25
23
|
|
26
24
|
|
25
|
+
class TodoUpdate(LoginRequiredMixin, UpdateView): # LoginRequiredMixin, を追加
|
26
|
+
|
27
27
|
```
|