Last change
on this file since 1395 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
|
Rev | Line | |
---|
[1393] | 1 | ##parameters=key=None |
---|
| 2 | # $Id: reservedRoomsVoc.py 1393 2007-02-05 21:42:08Z joachim $ |
---|
| 3 | """ |
---|
| 4 | Return the reservedrooms as an vocabulary |
---|
| 5 | |
---|
| 6 | """ |
---|
| 7 | doc = context.getContent() |
---|
| 8 | voc = [("_".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() |
---|
| 11 | if not key: |
---|
| 12 | return voc |
---|
| 13 | for k,v in voc: |
---|
| 14 | if k == key: |
---|
| 15 | return v |
---|
Note: See
TracBrowser for help on using the repository browser.