Changeset 12859 for main/waeup.kofa/trunk/src/waeup/kofa/hostels
- Timestamp:
- 16 Apr 2015, 18:49:08 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/hostels/export.py
r9307 r12859 26 26 27 27 class HostelExporter(grok.GlobalUtility, ExporterBase): 28 """Exporter for hostels. 28 """The Hostel Exporter exports container data. It does not 29 export beds inside the container. 29 30 """ 30 31 grok.implements(ICSVExporter) 31 32 grok.name('hostels') 32 33 33 #: Fieldnames considered by this exporter34 34 fields = tuple(sorted(iface_names(IHostel))) 35 36 #: The title under which this exporter will be displayed37 35 title = _(u'Hostels') 38 36 39 37 def export_all(self, site, filepath=None): 40 38 """Export hostels into filepath as CSV data. 41 42 39 If `filepath` is ``None``, a raw string with CSV data is returned. 43 40 """ … … 48 45 return self.close_outfile(filepath, outfile) 49 46 47 50 48 class BedExporter(grok.GlobalUtility, ExporterBase): 51 """Exporter for courses. 49 """The Bed Exporter exports all beds stored in the 50 hostel containers. The exporter iterates over all hostels 51 and over all beds inside each hostel container. 52 52 """ 53 53 grok.implements(ICSVExporter) 54 54 grok.name('beds') 55 55 56 #: Fieldnames considered by this exporter57 56 fields = tuple(sorted(iface_names(IBed))) + ( 58 57 'hall', 'block', 'room', 'bed', 'special_handling', 'sex', 'bt') 59 60 #: The title under which this exporter will be displayed61 58 title = _(u'Beds') 62 59 63 60 def export_all(self, site, filepath=None): 64 61 """Export beds into filepath as CSV data. 65 66 62 If `filepath` is ``None``, a raw string with CSV data is returned. 67 63 """
Note: See TracChangeset for help on using the changeset viewer.