Changeset 9673 for main/waeup.kofa/trunk/src/waeup/kofa/students/reports.py
- Timestamp:
- 17 Nov 2012, 23:43:02 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/reports.py
r9672 r9673 128 128 self.data = get_students_by(session, mode) 129 129 130 @property131 def title(self):132 title = 'StudentsReport_%s_%s_%s' % (133 self.session, self.mode, self._creation_dt_string)134 title = title.replace('/', '_').replace(' ','_')135 return title136 137 130 def create_pdf(self): 138 131 creator = getUtility(IPDFCreator) … … 223 216 224 217 def render(self): 225 filename = "%s.pdf" % (self.context.title) 218 filename = 'StudentsReport_%s_%s_%s.pdf' % ( 219 self.context.session, self.context.mode, 220 self._creation_dt_string) 221 filename = filename.replace( 222 '/', '_').replace(' ','_').replace(':', '-') 226 223 self.response.setHeader( 227 224 'Content-Type', 'application/pdf')
Note: See TracChangeset for help on using the changeset viewer.