def _form(self): if self.__form_cache is not None: return self.__form_cache inputs = map(lambda x: x.field, self.get_active_fields()) # TODO: creating the form everytime might by a wrong approach... logger.debug("Creating Form()...") form = Form(*inputs) form.fill(self.data) self.__form_cache = form return form