source: WAeUP_SRP/trunk/skins/waeup_accommodation/reservedRoomsVoc.py @ 1405

Last change on this file since 1405 was 1393, checked in by joachim, 18 years ago

new method book_reserved_bed to book a reserved bed for a student

  • Property svn:keywords set to Id
File size: 356 bytes
Line 
1##parameters=key=None
2# $Id: reservedRoomsVoc.py 1393 2007-02-05 21:42:08Z joachim $
3"""
4Return the reservedrooms as an vocabulary
5
6"""
7doc = context.getContent()
8voc = [("_".join((r.split('/')[0],r.split('/')[1])),r)
9                      for r in doc.reserved_rooms.split(',') if r]
10#from Products.zdb import set_trace;set_trace()
11if not key:
12    return voc
13for k,v in voc:
14    if k == key:
15        return v
Note: See TracBrowser for help on using the repository browser.