From 184000ec978f6c0119bdb94a0cd24dbb84a09125 Mon Sep 17 00:00:00 2001 From: Kriti Godey Date: Sun, 9 Jan 2011 17:09:12 -0500 Subject: [PATCH] Initial model classes written. Still a few additions needed. --- contrib/julian/models.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/contrib/julian/models.py b/contrib/julian/models.py index 71a8362..049473c 100644 --- a/contrib/julian/models.py +++ b/contrib/julian/models.py @@ -1,3 +1,22 @@ from django.db import models +from philo.models.base import Tag, Entity, Titled +import datetime + +class Location(Entity, Titled): + slug = models.SlugField(max_length=255, unique=True) + + +class Calendar(Entity, Titled): + slug = models.SlugField(max_length=255, unique=True) + + +class Event(Entity, Titled): + description = models.TextField() + start_time = models.DateTimeField() + end_time = models.DateTimeField() + is_all_day_event = models.BooleanField(default=False) + time_created = models.DateTimeField(default=datetime.datetime.now) + location = models.ForeignKey(Location) + calendars = models.ManyToManyField(Calendar) + tags = models.ManyToManyField(Tag) -# Create your models here. -- 2.20.1