Skip to content

Instantly share code, notes, and snippets.

@trepca
Created September 18, 2010 12:23
Show Gist options
  • Save trepca/585617 to your computer and use it in GitHub Desktop.
Save trepca/585617 to your computer and use it in GitHub Desktop.
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