app/soc/models/program.py
changeset 766 046b4b51eabf
parent 740 caa143c799a7
child 769 a0ee643fe832
--- a/app/soc/models/program.py	Tue Jan 06 16:01:16 2009 +0000
+++ b/app/soc/models/program.py	Tue Jan 06 16:55:27 2009 +0000
@@ -26,6 +26,7 @@
 from django.utils.translation import ugettext_lazy
 
 import soc.models.presence
+import soc.models.timeline
 
 
 class Program(soc.models.presence.Presence):
@@ -57,3 +58,9 @@
   description = db.TextProperty(required=True,
       verbose_name=ugettext_lazy('Description'))
   description.example_text = ugettext_lazy('This is the program for GSoC 2009')
+
+  #: Required 1:1 relationship indicating the Program the Timeline
+  #: belongs to.
+  timeline = db.ReferenceProperty(reference_class=soc.models.timeline.Timeline,
+                                 required=True, collection_name="program",
+                                 verbose_name=ugettext_lazy('Timeline'))