`07-django-models.md` 的 `models.ForeignKey` 現在需要on_delete
doomleika opened this issue · 0 comments
doomleika commented
class MenuItem(models.Model):
store = models.ForeignKey('Store', related_name='menu_items')
name = models.CharField(max_length=20)
price = models.IntegerField()
def __str__(self):
return self.name