1

I could not understand why after logging in from address:

http://localhost/en/accounts/login/?next=/en/test/

I get refirected to

http://localhost/accounts/profile/

So i ran search in django files and found that this address is the default LOGIN_REDIRECT_URL for django.

What i did not understand is why it gets redirected to there. I guessed, that my login form's post address should be :

/accounts/login/?next=/en/test/

instead of

/accounts/login/

I wrote it into template and it worked. But since the redirect url changes dynamically, how can i make this login post forms address change dynamically too? is there a templatetag for that or something?

Alan

2 Answers 2

2

Acutally, i think i figured it out... I should not change login forms post address, but just post the form to the same address where i am.

edit:It worked just fine.

-1

In settings.py you may set the LOGIN_REDIRECT_URL

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.