Skip to content

Instantly share code, notes, and snippets.

@egitimplus
Created November 2, 2020 21:46
Show Gist options
  • Save egitimplus/7551a9d8974c070d39858282cd8c053c to your computer and use it in GitHub Desktop.
Save egitimplus/7551a9d8974c070d39858282cd8c053c to your computer and use it in GitHub Desktop.
class CarModel(models.Model):
name = models.CharField(max_length=255)
car = models.ForeignKey(Car, on_delete=models.CASCADE)
def __str__(self):
return self.name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment