Skip to content

Instantly share code, notes, and snippets.

@palewire
Last active August 29, 2015 14:10
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 palewire/df299dd964e9ef6bdab8 to your computer and use it in GitHub Desktop.
Save palewire/df299dd964e9ef6bdab8 to your computer and use it in GitHub Desktop.
from django.db import models
class Author(models.Model):
first_name = models.CharField(max_length=200)
last_name = models.CharField(max_length=200)
class Book(models.Model):
title = models.CharField(max_length=200)
page_count = models.IntegerField()
author = models.ForeignKey(Author, db_column="foobazbar_author_id")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment