Skip to content

Instantly share code, notes, and snippets.

@egitimplus
Last active November 5, 2020 17:59
Show Gist options
  • Save egitimplus/c186f545d659dd73deb18a33b4059553 to your computer and use it in GitHub Desktop.
Save egitimplus/c186f545d659dd73deb18a33b4059553 to your computer and use it in GitHub Desktop.
class CarModel(models.Model):
name = models.CharField(max_length=255)
audio = models.ForeignKey(Audio, on_delete=models.CASCADE, related_name="carmodels", blank=True, null=True)
def __str__(self):
return self.name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment