How to redirect url with request parameters

58 views
Skip to first unread message

Sandeep Gorrey

unread,
Apr 2, 2015, 8:23:28 AM4/2/15
to django-so...@googlegroups.com

Hi,

I am very new to python social auth and currently working for a project where i have used social authentication.

My problem is that I want to redirect the url after authentication to the same page
with request parameters

ex: before authentication www.example.com/?city='XXXXX' to
after authentication www.example.com/?city='XXXXX'

I have set in my settings.py file 'LOGIN_REDIRECT_URL' = '/', so it always redirects to www.example.com

I tried using next="?city='xxxx'" in my template but still it redirects to the home page

Please advise

Regards,
Sandeep

Matías Aguirre

unread,
Apr 2, 2015, 12:08:00 PM4/2/15
to Sandeep Gorrey, django-social-auth
The value "?city=xxxx" is not a valid URL, you are missing the path, also, are
you escaping it? The link should look like:

/complete/facebook/?next=%2F%3Fcity%3Dxxxx

Best,
Matías

Excerpts from Sandeep Gorrey's message of 2015-04-02 09:23:28 -0300:
--
Matías Aguirre (matias...@gmail.com)

Sandeep Gorrey

unread,
Apr 2, 2015, 5:47:14 PM4/2/15
to django-so...@googlegroups.com, sandee...@gmail.com
Hallo Matias,

Thanks for the input. This solved my problem

Cheers,
Sandeep
Reply all
Reply to author
Forward
0 new messages