Created
November 25, 2013 21:21
-
-
Save bogsio/7649122 to your computer and use it in GitHub Desktop.
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 | |
from django.contrib.auth.models import User | |
class TodoList(models.Model): | |
name = models.CharField('List Title', max_length=200) | |
author = models.ForeignKey(User, related_name='todo_lists') | |
class TodoItem(models.Model): | |
text = models.TextField('Item Text') | |
todo_list = models.ForeignKey(TodoList, related_name='items') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment