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/applicants/export.py

    r12180 r12859  
    2929
    3030class ApplicantsContainerExporter(grok.GlobalUtility, ExporterBase):
    31     """Exporter for ApplicantsContainers.
     31    """The Applicants Container Exporter exports container data. It does not
     32    export applicants (application records) inside the container.
    3233    """
    3334    grok.implements(ICSVExporter)
    3435    grok.name('applicantscontainers')
    3536
    36     #: Fieldnames considered by this exporter
    3737    fields = tuple(sorted(iface_names(IApplicantsContainer)))
    38     #: The title under which this exporter will be displayed
    3938    title = _(u'Applicants Containers')
    4039
     
    6362        return self.export(containers.values(), filepath)
    6463
     64
    6565class ApplicantExporter(grok.GlobalUtility, ExporterBase):
    66     """Exporter for Applicants.
     66    """The Applicant Exporter exports all application records (= applicants)
     67    stored in the database. In contrast to the exporters in the academics
     68    section this exporter does not iterate over the items of containers
     69    but searches the Applicants Catalog instead.
    6770    """
    6871    grok.implements(ICSVExporter)
    6972    grok.name('applicants')
    7073
    71     #: Fieldnames considered by this exporter
    7274    fields = tuple(sorted(IApplicantBaseData.names())) + ('container_code',)
    73 
    74     #: The title under which this exporter will be displayed
    7575    title = _(u'Applicants')
    7676
    7777    def mangle_value(self, value, name, context=None):
     78        """The mangler determines the the codes of the atributes `course1`,
     79        `course2` and `course_admitted`. It furthermore prepares the
     80        history messages and adds a hash symbol at the end of the phone number
     81        to avoid annoying automatic number transformation by Excel or Calc.
     82        """
    7883        if name in (
    7984            'course1', 'course2', 'course_admitted') and value is not None:
Note: See TracChangeset for help on using the changeset viewer.