def make_view(self, action_group):
        """
        Create a view function

        Check permission and Dispatch request to action by request.method
        """
        def view(*args, **kwargs):
            try:
                httpmathod = request.method.lower()
                if httpmathod not in action_group:
                    abort(405)
                resp = self._before_request()
                if resp is None:
                    fn = action_group[httpmathod]
                    resp = fn(get_request_data())
            except Exception as ex:
                resp = self._handle_error(ex)
                if resp is None:
                    raise
            resp = self._after_request(*unpack(resp))
            return export(*resp)
        return view
def make_view ( self , action_group ) : def view ( * args , ** kwargs ) : try : httpmathod = request . method . lower ( ) if httpmathod not in action_group : abort ( 405 ) resp = self . _before_request ( ) if resp is None : fn = action_group [ httpmathod ] resp = fn ( get_request_data ( ) ) except Exception as ex : resp = self . _handle_error ( ex ) if resp is None : raise resp = self . _after_request ( * unpack ( resp ) ) return export ( * resp ) return view
Create a view function

        Check permission and Dispatch request to action by request.method