Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Arun February 13, 2011
file 16 lines (10 sloc) 0.404 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
from django.db import models

class TodoList(models.Model):
    name = models.CharField(max_length=100)
    
    def __unicode__(self):
        return self.name

class TodoItem(models.Model):
    name = models.CharField(max_length=150, help_text="e.g. Buy milk, wash dog etc")
    list = models.ForeignKey(TodoList)
    
    def __unicode__(self):
        return self.name + " (" + str(self.list) + ")"

Something went wrong with that request. Please try again.