Changeset 6976
- Timestamp:
- 31 Oct 2011, 10:53:17 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/hostels
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/hostels/hostel.py
r6975 r6976 57 57 beds_for_final = getattr(self,'beds_for_final',[]) 58 58 beds_for_all = getattr(self,'beds_for_all',[]) 59 beds_reserved = [] #temporarily empty59 beds_reserved = getattr(self,'beds_reserved',[]) 60 60 all_blocks = blocks_for_female + blocks_for_male 61 61 all_beds = (beds_for_pre + beds_for_fresh + 62 62 beds_for_returning + beds_for_final + beds_for_all) 63 #import pdb;pdb.set_trace()64 63 for block in all_blocks: 65 64 sex = 'male' … … 71 70 room_nr = floor*100 + room 72 71 bt = 'all' 73 if (block,room_nr) in beds_reserved:72 if '%s_%s_%s' % (block,room_nr,bed) in beds_reserved: 74 73 bt = "reserved" 75 74 elif bed in beds_for_fresh: … … 123 122 beds_for_final = getattr(self,'beds_for_final',[]) 124 123 hostel = self.__parent__ 125 bed_string = u'%s_%s_%s 124 bed_string = u'%s_%s_%s' % (block, room_nr, bed) 126 125 if bt == 'reserved': 127 126 bt = 'all' … … 135 134 bt = 're' 136 135 bt = u'%s_%s_%s' % (sh, sex, bt) 137 hostel. reserved.remove(bed_string)136 hostel.beds_reserved.remove(bed_string) 138 137 else: 139 138 bt = u'%s_%s_reserved' % (sh, sex) 140 hostel. reserved.append(bed_string)139 hostel.beds_reserved.append(bed_string) 141 140 self.bed_type = bt 142 141 return -
main/waeup.sirp/trunk/src/waeup/sirp/hostels/interfaces.py
r6975 r6976 54 54 ) 55 55 56 reserved = schema.List(56 beds_reserved = schema.List( 57 57 title = u'Reserved Beds', 58 58 value_type = schema.TextLine( 59 title = u'Bed',60 59 default = u'', 61 60 required = False,
Note: See TracChangeset for help on using the changeset viewer.