def __call__(
            self,
            portal_type=None,
            title=None,
            description=None,
            image=None):
        """Evaluate form and redirect"""
        if title is not None:
            self.portal_type = portal_type
            self.title = title.strip()
            self.description = description.strip()
            self.image = image
            if self.portal_type in api.portal.get_tool('portal_types'):
                url = self.create(image)
                return self.redirect(url)
        return self.template()
def __call__ ( self , portal_type = None , title = None , description = None , image = None ) : if title is not None : self . portal_type = portal_type self . title = title . strip ( ) self . description = description . strip ( ) self . image = image if self . portal_type in api . portal . get_tool ( 'portal_types' ) : url = self . create ( image ) return self . redirect ( url ) return self . template ( )
Evaluate form and redirect