Changeset 1596 for WAeUP_SRP/branches/joachim-event-branch/skins/waeup_accommodation/allocate_reserved_bed.py
- Timestamp:
- 19 Mar 2007, 21:45:44 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/branches/joachim-event-branch/skins/waeup_accommodation/allocate_reserved_bed.py
r1477 r1596 13 13 acco_cat = context.portal_accommodation 14 14 import logging 15 logger = logging.getLogger(' Accommodation.AllocateReservedBed')15 logger = logging.getLogger('Skins.allocate_reserved_bed') 16 16 17 17 #change = REQUEST.has_key("allocate_and_change") … … 73 73 if allocate or change: 74 74 if already and not change: 75 psm = "Student %s already reserved bed %s" % (sid, already[0].bed)75 psm = "Student %s has already reserved bed %s" % (sid, already[0].bed) 76 76 break 77 77 if not bed_brain.bed_type.endswith("reserved"): 78 psm = " Not a reserved bed: %s" % bid78 psm = "%s is not a reserved bed" % bid 79 79 break 80 80 if bed_brain.student and not change: … … 88 88 acco_doc = getattr(student_obj, acco_id).getContent() 89 89 if acco_doc.bed == bid: 90 psm = "Student %s has already booked ( paid) bed %s" % (sid, bid)90 psm = "Student %s has already booked (and paid) bed %s" % (sid, bid) 91 91 break 92 92 if not already: … … 94 94 break 95 95 if not bed_brain.bed_type.endswith("reserved"): 96 psm = " Not a reserved bed: %s" % bid96 psm = "%s is not a reserved bed" % bid 97 97 break 98 98 if not bed_brain.student: … … 118 118 acco_doc = getattr(student_obj, acco_id).getContent() 119 119 acco_doc.edit(mapping={'bed': bid}) 120 logger.info(' "%s","booked reserved bed %s for","%s"' % (member,bid,sid))120 logger.info('%s booked reserved bed %s for %s' % (member,bid,sid)) 121 121 psm = "Bed %s reserved for %s %s" % (bid,sid,student.name) 122 122 elif release: … … 130 130 if modify: 131 131 acco_cat.modifyRecord(bed=bid,student='') 132 logger.info(' "%s","cancelled reservation %s by","%s"' % (member,bid,sid))132 logger.info('%s released bed %s booked by %s' % (member,bid,sid)) 133 133 psm = "%s removed from %s" % (student.name,bid) 134 134 else: 135 psm = " %s removing failed from %s" % (student.name,bid)135 psm = "Removing of %s from bed %s failed" % (student.name,bid) 136 136 137 137 mode = 'view'
Note: See TracChangeset for help on using the changeset viewer.