Initial model classes written. Still a few additions needed.
[philo.git] / contrib / julian / models.py
1 from django.db import models
2 from philo.models.base import Tag, Entity, Titled
3 import datetime
4
5 class Location(Entity, Titled):
6         slug = models.SlugField(max_length=255, unique=True)
7
8
9 class Calendar(Entity, Titled):
10         slug = models.SlugField(max_length=255, unique=True)
11
12
13 class Event(Entity, Titled):
14         description = models.TextField()
15         start_time = models.DateTimeField()
16         end_time = models.DateTimeField()
17         is_all_day_event = models.BooleanField(default=False)
18         time_created = models.DateTimeField(default=datetime.datetime.now)
19         location = models.ForeignKey(Location)
20         calendars = models.ManyToManyField(Calendar)
21         tags = models.ManyToManyField(Tag)
22