Skip to content

Instantly share code, notes, and snippets.

@orf
Created June 16, 2013 17:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save orf/5792769 to your computer and use it in GitHub Desktop.
Save orf/5792769 to your computer and use it in GitHub Desktop.
class Artist(models.Model):
name = models.CharField(max_length=100)
class Band(models.Model):
name = models.CharField(max_length=100)
members = models.ManyToManyField(Artist, related_name="bands")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment