Skip to content

Instantly share code, notes, and snippets.

@bruth
Created September 5, 2011 03:00
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 bruth/1193972 to your computer and use it in GitHub Desktop.
Save bruth/1193972 to your computer and use it in GitHub Desktop.
class Book(models.Model):
title = models.CharField(max_length=50)
author = models.ForeignKey(Author)
summary = models.TextField()
pub_date = models.DateField()
book = Book('John Doe: The Autobiography', author,
'A long, long time ago..', date(2011, 9, 3))
book.save()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment