Dojagoのmodels.pyでクラスを作成する時の引数の中身をmodel.Modelにする理由がよくわかりません。初歩的ですがお願いします。
追記ー 公式ドキュメントの例です。
python
1from django.db import models 2 3 4class Question(models.Model): 5 question_text = models.CharField(max_length=200) 6 pub_date = models.DateTimeField('date published') 7 8 9class Choice(models.Model): 10 question = models.ForeignKey(Question, on_delete=models.CASCADE) 11 choice_text = models.CharField(max_length=200) 12 votes = models.IntegerField(default=0)
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。