如何在不使用Python中的协议(http,https或ftp)的情况下重定向URL?

I am trying to convert PHP code to Python for the payment gateway integration. In PHP, there is a code "header("Location: " . $url);" and the URL is "gatewaysdk://asdzxc?summaryStatus=SUCCESSFUL&3DSecureId=XXXXXX"(without protocol - http, https or ftp).
In PHP, the code is working fine.
Is there any way to do it in Python.

I have tried using redirect and HttpResponseRedirect - return redirect(redirect_url, allow_redirects=True).
The error I got was
"django.core.exceptions.DisallowedRedirect: Unsafe redirect to URL with protocol 'gatewaysdk'".
After debugging the error I found HttpResponseRedirect supports only with protocol (http, https or ftp).