it is simple:
p3 = Place(name="Demon Dogs", address="944 W. Fullerton")
p3.save() # <--- you need to save the instance first, and then assign
Restaurant.objects.create(
place=p3, serves_hot_dogs=True, serves_pizza=False
)
it is simple:
p3 = Place(name="Demon Dogs", address="944 W. Fullerton")
p3.save() # <--- you need to save the instance first, and then assign
Restaurant.objects.create(
place=p3, serves_hot_dogs=True, serves_pizza=False
)