Last change
on this file since 2576 was
389,
checked in by joachim, 18 years ago
|
added title_prefix to department and renamed institution_type to title_prefix
for faculty.
|
-
Property svn:keywords set to
Id
|
File size:
359 bytes
|
Line | |
---|
1 | ##parameters=key=None |
---|
2 | # $Id: get_departments_voc.py 389 2006-08-18 06:49:13Z joachim $ |
---|
3 | """ |
---|
4 | Return the faculties as an vocabulary |
---|
5 | |
---|
6 | """ |
---|
7 | if key is None: |
---|
8 | res = context.portal_catalog.search({'meta_type': "Department"}) |
---|
9 | return [(d.getId(),d.Title,) for d in res] |
---|
10 | res = context.portal_catalog.search({'meta_type': "Department", 'id': key}) |
---|
11 | if res: |
---|
12 | return res[-1].Title |
---|
13 | return "unknown Department %s" % key |
---|
14 | |
---|
Note: See
TracBrowser for help on using the repository browser.