[Answer]-Django pass get parameters from login to users home page

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')
👤Marat

Leave a comment