Ignore:
Timestamp:
16 Apr 2015, 18:49:08 (10 years ago)
Author:
Henrik Bettermann
Message:

Add more exporter documentation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/hostels/export.py

    r9307 r12859  
    2626
    2727class HostelExporter(grok.GlobalUtility, ExporterBase):
    28     """Exporter for hostels.
     28    """The Hostel Exporter exports container data. It does not
     29    export beds inside the container.
    2930    """
    3031    grok.implements(ICSVExporter)
    3132    grok.name('hostels')
    3233
    33     #: Fieldnames considered by this exporter
    3434    fields = tuple(sorted(iface_names(IHostel)))
    35 
    36     #: The title under which this exporter will be displayed
    3735    title = _(u'Hostels')
    3836
    3937    def export_all(self, site, filepath=None):
    4038        """Export hostels into filepath as CSV data.
    41 
    4239        If `filepath` is ``None``, a raw string with CSV data is returned.
    4340        """
     
    4845        return self.close_outfile(filepath, outfile)
    4946
     47
    5048class 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.
    5252    """
    5353    grok.implements(ICSVExporter)
    5454    grok.name('beds')
    5555
    56     #: Fieldnames considered by this exporter
    5756    fields = tuple(sorted(iface_names(IBed))) + (
    5857        'hall', 'block', 'room', 'bed', 'special_handling', 'sex', 'bt')
    59 
    60     #: The title under which this exporter will be displayed
    6158    title = _(u'Beds')
    6259
    6360    def export_all(self, site, filepath=None):
    6461        """Export beds into filepath as CSV data.
    65 
    6662        If `filepath` is ``None``, a raw string with CSV data is returned.
    6763        """
Note: See TracChangeset for help on using the changeset viewer.