def process_exception(self, request, exception):
        from merengue.pluggable.utils import get_plugins_middleware_methods

        for method in get_plugins_middleware_methods("exception_middleware"):
            response = method(request)
            if response:
                return response
    def process_view(self, request, view_func, view_args, view_kwargs):
        from merengue.pluggable.utils import get_plugins_middleware_methods

        for method in get_plugins_middleware_methods("view_middleware"):
            response = method(request, view_func, view_args, view_kwargs)
            if response:
                return response
Exemple #3
0
 def process_exception(self, request, exception):
     from merengue.pluggable.utils import get_plugins_middleware_methods
     for method in get_plugins_middleware_methods('exception_middleware'):
         response = method(request)
         if response:
             return response
Exemple #4
0
 def process_response(self, request, response):
     from merengue.pluggable.utils import get_plugins_middleware_methods
     for method in get_plugins_middleware_methods('response_middleware'):
         response = method(request, response)
     return response
Exemple #5
0
 def process_view(self, request, view_func, view_args, view_kwargs):
     from merengue.pluggable.utils import get_plugins_middleware_methods
     for method in get_plugins_middleware_methods('view_middleware'):
         response = method(request, view_func, view_args, view_kwargs)
         if response:
             return response
    def process_response(self, request, response):
        from merengue.pluggable.utils import get_plugins_middleware_methods

        for method in get_plugins_middleware_methods("response_middleware"):
            response = method(request, response)
        return response