app/soc/logic/models/program.py
changeset 2811 c8901482dc9c
parent 2787 8408741aee63
child 2812 9280179e34fd
equal deleted inserted replaced
2810:e63b3e0845a9 2811:c8901482dc9c
    16 
    16 
    17 """Program (Model) query functions.
    17 """Program (Model) query functions.
    18 """
    18 """
    19 
    19 
    20 __authors__ = [
    20 __authors__ = [
    21   '"Sverre Rabbelier" <sverre@rabbelier.nl>',
    21     '"Sverre Rabbelier" <sverre@rabbelier.nl>',
    22   '"Lennard de Rijk" <ljvderijk@gmail.com>',
    22     '"Lennard de Rijk" <ljvderijk@gmail.com>',
    23   ]
    23   ]
    24 
    24 
    25 
    25 
    26 from soc.logic.models import presence_with_tos
    26 from soc.logic.models import presence_with_tos
    27 from soc.logic.models import sponsor as sponsor_logic
    27 from soc.logic.models import sponsor as sponsor_logic
    28 
    28 
    29 import gsoc.logic.models.timeline
       
    30 import soc.logic.models.timeline
    29 import soc.logic.models.timeline
    31 import soc.models.program
    30 import soc.models.program
       
    31 
       
    32 from gsoc.logic.models.timeline import logic as gsoc_timeline_logic
    32 
    33 
    33 
    34 
    34 class Logic(presence_with_tos.Logic):
    35 class Logic(presence_with_tos.Logic):
    35   """Logic methods for the Program model.
    36   """Logic methods for the Program model.
    36   """
    37   """
    37 
    38 
    38   TIMELINE_LOGIC = {'gsoc' : gsoc.logic.models.timeline.logic,
    39   TIMELINE_LOGIC = {'gsoc' : gsoc.logic.models.timeline.logic,
    39                     'ghop' : soc.logic.models.timeline.logic}
    40                     'ghop' : soc.logic.models.timeline.logic}
    40 
    41 
       
    42 
    41   def __init__(self, model=soc.models.program.Program, 
    43   def __init__(self, model=soc.models.program.Program, 
    42                base_model=None, scope_logic=sponsor_logic):
    44                base_model=None, scope_logic=sponsor_logic,
       
    45                timeline_logic=gsoc_timeline_logic):
    43     """Defines the name, key_name and model for this entity.
    46     """Defines the name, key_name and model for this entity.
    44     """
    47     """
       
    48 
       
    49     self.timeline_logic = timeline_logic
    45 
    50 
    46     super(Logic, self).__init__(model=model, base_model=base_model,
    51     super(Logic, self).__init__(model=model, base_model=base_model,
    47                                 scope_logic=scope_logic)
    52                                 scope_logic=scope_logic)
    48 
    53 
    49 
    54