Django 4.2.7 & django-allauth 0.58.2 "next" parameter issue

70 Views Asked by At

I am trying to redirect my user after login to page he refered, using login_required decorator.

If I do not provide {{ redirect_field_name }} in login template it does not work at all (redirects to LOGIN_REDIRECT_URL, even "next" parameter in url exists).
But when I provide {{ redirect_field_name }} it firstly redirects to "/accounts/login/next" (with 404 error) and when I press back button it goes to desired page. Could somebody help me to solve this issue?

1

There are 1 best solutions below

0
On BEST ANSWER

Finally I found error my self. Problem was in my input field. By mistake I provided {{ redirect_field_name }} both in "name" and "value" parameters.