質問編集履歴

1

model追加

2021/04/04 08:33

投稿

shuring
shuring

スコア19

test CHANGED
File without changes
test CHANGED
@@ -20,7 +20,9 @@
20
20
 
21
21
 
22
22
 
23
+ ```
24
+
23
- ```views.py
25
+ ###views.py
24
26
 
25
27
  class Edit(LoginRequiredMixin, generic.UpdateView):
26
28
 
@@ -54,4 +56,16 @@
54
56
 
55
57
  return super().form_invalid(form)
56
58
 
59
+
60
+
61
+ ###models.py
62
+
63
+ class Content(models.Model):
64
+
65
+ owner =models.ForeignKey(CustomUser, on_delete=models.CASCADE)
66
+
67
+ title =models.CharField(max_length=100)
68
+
69
+ introduction =models.TextField()
70
+
57
71
  ```