Skip to content

Instantly share code, notes, and snippets.

@zmsmith
Created August 20, 2010 14:43
Show Gist options
  • Save zmsmith/540459 to your computer and use it in GitHub Desktop.
Save zmsmith/540459 to your computer and use it in GitHub Desktop.
class Author(models.Model):
first_name = models.CharField(max_length=255)
last_name = models.CharField(max_length=255)
books = models.ManyToManyField('Book')
class Book(models.Model):
title = models.CharField(max_length=255)
class BookStore(model.Model):
name = models.CharField(max_length=255)
books = models.ManyToManyField('Book')</pre>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment