[Answer]-Django HttpResponseRedirect with reverse is not working

1👍

You have two errors.

Firstly, the first parameter to reverse is the view name, not the URL. So it should be ‘mge.core.views.rateio’ as in urls.py. Or even better, give the pattern an explicit name – name="ratio" and use that.

Secondly, you have three kwargs you’re trying to pass, but the ratio URL does not accept any parameters. What are you hoping to do with those values? Two of them are JSON docs, you wouldn’t want to pass those in the URL.

Leave a comment