Created
May 22, 2014 04:25
-
-
Save hansnow/bdfeb4166d8d99569ca3 to your computer and use it in GitHub Desktop.
这个一个Gist测试
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db import models | |
class Publisher(models.Model): | |
name = models.CharField(max_length=30) | |
address = models.CharField(max_length=50) | |
city = models.CharField(max_length=60) | |
state_province = models.CharField(max_length=30) | |
country = models.CharField(max_length=50) | |
website = models.URLField() | |
class Author(models.Model): | |
first_name = models.CharField(max_length=30) | |
last_name = models.CharField(max_length=40) | |
email = models.EmailField() | |
class Book(models.Model): | |
title = models.CharField(max_length=100) | |
authors = models.ManyToManyField(Author) | |
publisher = models.ForeignKey(Publisher) | |
publication_date = models.DateField() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment