Skip to content

Instantly share code, notes, and snippets.

@egitimplus
Last active November 5, 2020 22:16
Show Gist options
  • Save egitimplus/67b9dc8e106fd5e6ffcd95be60d543e3 to your computer and use it in GitHub Desktop.
Save egitimplus/67b9dc8e106fd5e6ffcd95be60d543e3 to your computer and use it in GitHub Desktop.
from django.db import models
class FuelType(models.Model):
name = models.CharField(max_length=255)
class Car(models.Model):
name = models.CharField(max_length=255)
fueltype = models.ManyToManyField(FuelType)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment