# HG changeset patch # User Sverre Rabbelier # Date 1231260927 0 # Node ID 046b4b51eabfe2ee5616c1ebc7d86f9799c6d1b9 # Parent a0a4cbd7693b228176094edb670361048b30864c Made Program reference Timeline Also made Timeline inherit from base like it should. Patch by: Sverre Rabbelier diff -r a0a4cbd7693b -r 046b4b51eabf app/soc/models/program.py --- 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')) diff -r a0a4cbd7693b -r 046b4b51eabf app/soc/models/timeline.py --- a/app/soc/models/timeline.py Tue Jan 06 16:01:16 2009 +0000 +++ b/app/soc/models/timeline.py Tue Jan 06 16:55:27 2009 +0000 @@ -25,18 +25,13 @@ from django.utils.translation import ugettext_lazy -import soc.models.program +from soc.models import base -class Timeline(soc.models.timeline.Timeline): + +class Timeline(base.ModelWithFieldAttributes): """The Timeline Model, representing the timeline for a Program. """ - #: Required 1:1 relationship indicating the Program the Timeline - #: belongs to. - program = db.ReferenceProperty(reference_class=soc.models.program.Program, - required=True, collection_name="timeline", - verbose_name=ugettext_lazy('Timeline')) - program_start_data = db.DateTimeProperty( verbose_name=ugettext_lazy('Program Start date'))