Changeset 1273 for WAeUP_SRP


Ignore:
Timestamp:
11 Jan 2007, 18:28:49 (18 years ago)
Author:
joachim
Message:

split bedname into hall,block,room,bed add filename

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_accommodation/hall_allocation_list.py

    r1271 r1273  
    2020fields = ("id",
    2121          "name",
     22          "hall",
     23          "block",
     24          "room",
    2225          "bed",
    2326          "matric_no",
     
    4346        continue
    4447    d = context.getFormattedStudentEntry(erg[0])
    45     d['bed'] = bed.bed
     48    hall,block,room,bed = bed.bed.split('_')
     49    d['hall'] = hall
     50    d['block'] = block
     51    d['room'] = room
     52    d['bed'] = bed
    4653    lines.append(format % d)
    4754#setheader('Content-type', 'text/x-cvs')
    4855#setheader('Content-type','application/vnd.ms-excel')
    4956setheader('Content-type','text/semicolon-seperated-values')
     57setheader('Content-Disposition:', 'attachment; filename="%s.csv"' % hall)
    5058setheader('Expires',  'Mon, 26 Jul 1997 05:00:00GMT') # Date in the past
    5159setheader('Cache-Control', 'no-store, no-cache,must-revalidate') # HTTP/1.1
Note: See TracChangeset for help on using the changeset viewer.