23👍
✅
get_success_url
doesn’t return an HttpResponseRedirect instead it should return the url you want to redirect to. So you can just return reverse('index')
:
def get_success_url(self):
return reverse('index')
👤nmu
0👍
A shortcut for HttpResponseRedirect is redirect(“View_name”)
it returns an HttpResponse (HTML)
Reverse returns a url
- Logging Django SQL queries with DEBUG set to False
- {% trans "string" %} not working on templates but {% trans variable %} does
- Celery: launch task on start
- Django + MySQL – Unknown encoding: utf8mb4
- Django.core.paginator Ajax pagination with jQuery
Source:stackexchange.com