equal
deleted
inserted
replaced
44 self.timeline_logic = gsoc.logic.models.timeline.logic |
44 self.timeline_logic = gsoc.logic.models.timeline.logic |
45 |
45 |
46 super(Logic, self).__init__(model=model, base_model=base_model, |
46 super(Logic, self).__init__(model=model, base_model=base_model, |
47 scope_logic=scope_logic) |
47 scope_logic=scope_logic) |
48 |
48 |
|
49 def createTimelineForType(self, fields): |
|
50 """Creates and stores a timeline model for the given type of program. |
|
51 """ |
|
52 |
|
53 properties = self.timeline_logic.getKeyFieldsFromFields(fields) |
|
54 key_name = self.timeline_logic.getKeyNameFromFields(properties) |
|
55 |
|
56 properties['scope'] = fields['scope'] |
|
57 |
|
58 timeline = self.timeline_logic.updateOrCreateFromKeyName(properties, |
|
59 key_name) |
|
60 return timeline |
|
61 |
49 |
62 |
50 logic = Logic() |
63 logic = Logic() |