Skip to content

Instantly share code, notes, and snippets.

@trepca
Created October 23, 2010 20:06
Show Gist options
  • Save trepca/642632 to your computer and use it in GitHub Desktop.
Save trepca/642632 to your computer and use it in GitHub Desktop.
class Todo(models.Model):
title = models.CharField(max_length=128)
owner = models.ForeignKey(User)
body = models.TextField(blank=True, null=True)
due_date = models.DateTimeField(blank=True, null=True)
start_date = models.DateTimeField(blank=True, null=True)
date_created = models.DateTimeField(auto_now_add=True)
location = models.CharField(max_length=128, blank=True, null=True)
all_day = models.BooleanField(default=False)
class Task(models.Model):
title = models.CharField(max_length=128)
owner = models.ForeignKey(User)
due_date = models.DateTimeField(blank=True, null=True)
start_date = models.DateTimeField(blank=True, null=True)
date_created = models.DateTimeField(auto_now_add=True)
notes = models.ManyToManyField('Note', blank=True, null=True)
class Event(models.Model):
title = models.CharField(max_length=128)
owner = models.ForeignKey(User)
start_date = models.DateTimeField(blank=True, null=True)
end_date = models.DateTimeField(blank=True, null=True)
date_created = models.DateTimeField(auto_now_add=True)
notes = models.ManyToManyField('Note', blank=True, null=True)
location = models.CharField(max_length=128, blank=True, null=True)
all_day = models.BooleanField(default=False)
class Note(models.Model):
body = models.TextField(blank=True, null=True)
date_created = models.DateTimeField(auto_now_add=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment