Added timeline_logic keyword argument to Program logic.
This will allow us to track which Timeline logic belongs to which each Program.
--- a/app/soc/logic/models/program.py Wed Aug 26 18:26:15 2009 +0200
+++ b/app/soc/logic/models/program.py Wed Aug 26 18:31:19 2009 +0200
@@ -18,18 +18,19 @@
"""
__authors__ = [
- '"Sverre Rabbelier" <sverre@rabbelier.nl>',
- '"Lennard de Rijk" <ljvderijk@gmail.com>',
+ '"Sverre Rabbelier" <sverre@rabbelier.nl>',
+ '"Lennard de Rijk" <ljvderijk@gmail.com>',
]
from soc.logic.models import presence_with_tos
from soc.logic.models import sponsor as sponsor_logic
-import gsoc.logic.models.timeline
import soc.logic.models.timeline
import soc.models.program
+from gsoc.logic.models.timeline import logic as gsoc_timeline_logic
+
class Logic(presence_with_tos.Logic):
"""Logic methods for the Program model.
@@ -38,11 +39,15 @@
TIMELINE_LOGIC = {'gsoc' : gsoc.logic.models.timeline.logic,
'ghop' : soc.logic.models.timeline.logic}
+
def __init__(self, model=soc.models.program.Program,
- base_model=None, scope_logic=sponsor_logic):
+ base_model=None, scope_logic=sponsor_logic,
+ timeline_logic=gsoc_timeline_logic):
"""Defines the name, key_name and model for this entity.
"""
+ self.timeline_logic = timeline_logic
+
super(Logic, self).__init__(model=model, base_model=base_model,
scope_logic=scope_logic)
--- a/app/soc/modules/ghop/logic/models/program.py Wed Aug 26 18:26:15 2009 +0200
+++ b/app/soc/modules/ghop/logic/models/program.py Wed Aug 26 18:31:19 2009 +0200
@@ -18,7 +18,8 @@
"""
__authors__ = [
- '"Madhusudan.C.S" <madhusudancs@gmail.com>'
+ '"Madhusudan.C.S" <madhusudancs@gmail.com>',
+ '"Lennard de Rijk" <ljvderijk@gmail.com>',
]
@@ -27,6 +28,8 @@
import soc.models.program
+from soc.modules.ghop.logic.models.timeline import logic as ghop_timeline_logic
+
import soc.modules.ghop.models.program
@@ -36,12 +39,13 @@
def __init__(self, model=soc.modules.ghop.models.program.GHOPProgram,
base_model=soc.models.program.Program,
- scope_logic=sponsor_logic):
+ scope_logic=sponsor_logic, timeline_logic=ghop_timeline_logic):
"""Defines the name, key_name and model for this entity.
"""
super(Logic, self).__init__(model, base_model=base_model,
- scope_logic=scope_logic)
+ scope_logic=scope_logic,
+ timeline_logic=timeline_logic)
logic = Logic()