Changeset 5207 for WAeUP_SRP/trunk
- Timestamp:
- 28 May 2010, 06:25:23 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/Accommodation.py
r3870 r5207 46 46 generated = [] 47 47 generated.append('"Bed","BedType","Student"' % vars()) 48 mod yfied = []49 mod yfied.append('"Bed","BedType","Student"' % vars())48 modified = [] 49 modified.append('"Bed","BedType","Student"' % vars()) 50 50 beds_generated = [] 51 51 for h in l: … … 57 57 hall_gen['name'] = hall.Title 58 58 count = 0 59 mod yfied_count = 059 modified_count = 0 60 60 reserved = [(r.split('/')[0],int(r.split('/')[1])) for r in re.split(',|\.| ',hall_doc.reserved_rooms) 61 61 if r] … … 109 109 elif bed_record.bed_type != bt: 110 110 bed_list.modifyRecord(**d) 111 mod yfied.append('"%(uid)s","%(bt)s"' % vars())112 mod yfied_count += 1111 modified.append('"%(uid)s","%(bt)s"' % vars()) 112 modified_count += 1 113 113 pass 114 114 hall_gen['count']= count 115 hall_gen['mod yfied_count']= modyfied_count115 hall_gen['modified_count']= modified_count 116 116 beds_generated.append(hall_gen) 117 117 current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S") 118 118 open("%s/export/bedlist_%s.csv" % (i_home,current),"w+").write('\n'.join(generated)) 119 open("%s/export/bedlist_mod yfied_%s.csv" % (i_home,current),"w+").write('\n'.join(modyfied))119 open("%s/export/bedlist_modified_%s.csv" % (i_home,current),"w+").write('\n'.join(modified)) 120 120 return self.accommodation.acco_folder_view(beds_generated=beds_generated) 121 121 ###)
Note: See TracChangeset for help on using the changeset viewer.