Changeset 7906


Ignore:
Timestamp:
18 Mar 2012, 14:24:13 (13 years ago)
Author:
uli
Message:

Add title and handle provider attribute correctly.

File:
1 edited

Legend:

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

    r7903 r7906  
    2020import grok
    2121from waeup.kofa.interfaces import ICSVExporter
     22from waeup.kofa.interfaces import MessageFactory as _
    2223from waeup.kofa.utils.batching import ExporterBase
    2324
     
    3233              'provider', 'application_category', 'description',
    3334              'startdate', 'enddate', 'strict_deadline')
     35
     36    #: The title under which this exporter will be displayed
     37    title = _(u'Basic Applicants Containers')
     38
     39    def mangle_value(self, value, name, context=None):
     40        if name == 'provider' and isinstance(value, tuple):
     41            value = value[0]
     42        return super(
     43            ApplicantsContainerExporter, self).mangle_value(
     44            value, name, context=context)
    3445
    3546    def export(self, containers, filepath=None):
Note: See TracChangeset for help on using the changeset viewer.