Changeset 6114 for main/waeup.sirp/trunk/src/waeup/sirp
- Timestamp:
- 16 May 2011, 14:00:34 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/applicants/applicants.py
r5983 r6114 29 29 DEFAULT_PASSPORT_IMAGE_MALE, 30 30 ) 31 from waeup.sirp.utils.helpers import attr_to_fields 31 32 32 33 class ResultEntry(grok.Context): … … 45 46 # ourselves and as a bonus we get free validation when an attribute is 46 47 # set. 47 for field_name in list(IApplicant): 48 setattr(Applicant, field_name, FieldProperty(IApplicant[field_name])) 48 Applicant = attr_to_fields(Applicant) 49 49 50 50 class ApplicantTraverser(grok.Traverser): … … 63 63 If none of the above applies, we return ``None``, most probably 64 64 resulting a :exc:`NotFound` exception. 65 65 66 66 """ 67 67 grok.context(IApplicant)
Note: See TracChangeset for help on using the changeset viewer.