Django - modify url argument before calling a view (middleware?)

I need to modify URL argument before a view is called. Let's say I just want to make it UPPERCASE. As the view is from a third-party app, I decided to create a middleware for this instead of overwriting the view.

class UpperCaseNameMiddleware(MiddlewareMixin):

    def process_view(self, request, callback, callback_args, callback_kwargs):
        if callback == the_third_party_view:
            raw_name = callback_kwargs["name"]
            return the_third_party_view(request, raw_name.upper())

this works but I'm afraid it doesn't continue calling other middlewares. Is there a way I can modify the name argument and continue as it would if there was no UpperCaseNameMiddleware?

Back to Top