Last active
August 25, 2020 06:07
-
-
Save velotiotech/ffc03ca7036d32cde8498255edfacbcd 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 User(models.Model): | |
name = models.CharField(max_length=60) | |
email = models.EmailField() | |
class Address(models.Model): | |
detail = models.CharField(max_length=100) | |
city = models.FloatField() | |
user = models.ForeignKey(User, related_name="addresses", on_delete=models.CASCADE) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment