Skip to content

Instantly share code, notes, and snippets.

@paulosman
Created January 22, 2013 19:30
Show Gist options
  • Save paulosman/4597598 to your computer and use it in GitHub Desktop.
Save paulosman/4597598 to your computer and use it in GitHub Desktop.
from django.db import models
class Author(models.Model):
name = models.CharField(max_length=255)
class Book(models.Model):
title = models.CharField(max_length=255)
author = models.ForeignKey(Author)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment