Ignore:
Timestamp:
16 May 2011, 14:00:34 (13 years ago)
Author:
uli
Message:
  • Remove trailing whitespaces.
  • Use attr_to_fields.
File:
1 edited

Legend:

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

    r5983 r6114  
    2929    DEFAULT_PASSPORT_IMAGE_MALE,
    3030    )
     31from waeup.sirp.utils.helpers import attr_to_fields
    3132
    3233class ResultEntry(grok.Context):
     
    4546# ourselves and as a bonus we get free validation when an attribute is
    4647# set.
    47 for field_name in list(IApplicant):
    48     setattr(Applicant, field_name, FieldProperty(IApplicant[field_name]))
     48Applicant = attr_to_fields(Applicant)
    4949
    5050class ApplicantTraverser(grok.Traverser):
     
    6363    If none of the above applies, we return ``None``, most probably
    6464    resulting a :exc:`NotFound` exception.
    65    
     65
    6666    """
    6767    grok.context(IApplicant)
Note: See TracChangeset for help on using the changeset viewer.