source: waeup_product/trunk/skins/waeup_faculty/get_faculties_voc.py @ 265

Last change on this file since 265 was 265, checked in by lregebro, 18 years ago

Fixed vocabularies lookup.

  • Property svn:keywords set to Id
File size: 302 bytes
Line 
1##parameters=key=None
2# $Id: get_faculties_voc.py 265 2006-06-23 08:58:00Z lregebro $
3"""
4Return the faculties as an vocabulary
5
6"""
7if key is None:
8    res = context.portal_catalog.search({'meta_type': "Faculty"})   
9    return [(d.getId,d.Title,) for d in res]
10dep = context.portal_catalog.search({'meta_type': "Faculty", 'id': key})[-1]
11return dep.Title
Note: See TracBrowser for help on using the repository browser.