diff -r 339696f3f5cf -r 801eee4eda9a app/soc/logic/models/program.py --- a/app/soc/logic/models/program.py Sat Aug 22 03:56:14 2009 +0530 +++ b/app/soc/logic/models/program.py Sat Aug 22 03:56:25 2009 +0530 @@ -46,5 +46,18 @@ super(Logic, self).__init__(model=model, base_model=base_model, scope_logic=scope_logic) + def createTimelineForType(self, fields): + """Creates and stores a timeline model for the given type of program. + """ + + properties = self.timeline_logic.getKeyFieldsFromFields(fields) + key_name = self.timeline_logic.getKeyNameFromFields(properties) + + properties['scope'] = fields['scope'] + + timeline = self.timeline_logic.updateOrCreateFromKeyName(properties, + key_name) + return timeline + logic = Logic()