views:

204

answers:

2

Hello

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

+1  A: 

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.

Zayatzz
A: 

In settings.py you may set the LOGIN_REDIRECT_URL

Praveen