Ignore:
Timestamp:
19 May 2011, 13:49:24 (14 years ago)
Author:
uli
Message:

Make local_roles a property of Faculty.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/university/faculty.py

    r6125 r6145  
    77from waeup.sirp.university.interfaces import (
    88    IFaculty, IFacultyAdd, IDepartment)
    9 from waeup.sirp.university.vocabularies import inst_types   
    10 
    11 local_roles = [
    12     {'name':'waeup.local.DepartmentOfficer','title':'Department Officer'},
    13     ]
     9from waeup.sirp.university.vocabularies import inst_types
    1410
    1511class Faculty(grok.Container):
     
    1713    """
    1814    grok.implements(IFaculty, IFacultyAdd)
     15
     16    @property       # Make this method read_only and looking like an attr.
     17    def local_roles(cls):
     18        return [
     19            {'name':'waeup.local.DepartmentOfficer',
     20             'title':'Department Officer'},
     21            ]
    1922
    2023    def __init__(self,
     
    5053            result = "%s (%s)" % (self.title, self.code)
    5154        return result
    52        
     55
    5356class FacultyFactory(grok.GlobalUtility):
    5457    """A factory for faculty containers.
Note: See TracChangeset for help on using the changeset viewer.