app/soc/logic/models/work.py
changeset 443 94568ac6e3e1
parent 436 f3c313d54aa4
child 446 0b479d573a4c
equal deleted inserted replaced
442:92c17629af0e 443:94568ac6e3e1
    17 """Work (Model) query functions.
    17 """Work (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   ]
    23   ]
    23 
    24 
    24 
    25 
    25 from soc.logic import key_name
    26 from soc.logic import key_name
    26 from soc.logic.models import base
    27 from soc.logic.models import base
    42     # views.models.base.View approach
    43     # views.models.base.View approach
    43     self._keyName = key_name.nameWork
    44     self._keyName = key_name.nameWork
    44     self._skip_properties = []
    45     self._skip_properties = []
    45     # TODO(tlarsen): write a nameWork method
    46     # TODO(tlarsen): write a nameWork method
    46 
    47 
       
    48   def getKeyValues(self, entity):
       
    49     """See base.Logic.getKeyNameValues.
       
    50     """
       
    51 
       
    52     return [entity.link_name]
       
    53 
       
    54   def getKeyValuesFromFields(self, fields):
       
    55     """See base.Logic.getKeyValuesFromFields.
       
    56     """
       
    57 
       
    58     return [fields['link_name']]
       
    59 
       
    60   def getKeyFieldNames(self):
       
    61     """See base.Logic.getKeyFieldNames
       
    62     """
       
    63 
       
    64     return ['link_name']
    47 
    65 
    48 logic = Logic()
    66 logic = Logic()