I'm writing a little website that logs when users click on a link (which is obviously a telephone number). It does this through a view, which then redirects to that telephone number.
Naturally, (I agree this should be default behavior) Django sees that as a SuspiciousOperation
. In my case, I'm doing it intentionally. How can I suppress this error and let the view resolve like I want it to?
I had cannot import name HttpResponseRedirectBase error with the first answer. I managed to do (nearly) as expected with :
from django.http.response import HttpResponseRedirectBase
HttpResponseRedirectBase.allowed_schemes += ['tel']
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With