Last active
October 21, 2019 12:49
-
-
Save jamilnoyda/d5d55f2a0cffe7e05a3b4ceb501bc943 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Place(models.Model): | |
name = models.CharField(max_length=50) | |
class Restaurant(models.Model): | |
place = models.OneToOneField(Place,on_delete=models.CASCADE) | |
serves_hot_dogs = models.BooleanField(default=False) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment