1👍
✅
#views.py
...
success_url = self.get_success_url()
if request.META.get('QUERY_STRING'):
success_url += '?' + request.META.get('QUERY_STRING')
return HttpResponseRedirect(success_url)
...
I would also recommend to replace
success_url = '/dashboard'
with:
from django.core import urlresolvers
...
success_url = urlresolvers.reverse('dashboard')
Source:stackexchange.com