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?
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.