Ask Your Question
1

redirect back to askbot after login via own django app

asked 2011-11-23 12:21:54 -0600

hjwp gravatar image

Next question! We're trying to integrate askbot with our own django app. Currently, after the user logs in, they are not redirected back to the askbot pages.

Normally in django you would use something like

/login/?next=/askbot

to tell your login view to redirect back to a certain page... But it looks like the default Hi there! Please sign in login link in askbot does not do this... More importantly, neither does the "Login/Signup to Post" button on the pre-login "Ask your question" form...

Should we just disable the ability to post before login?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2011-11-23 12:32:35 -0600

Evgeny gravatar image

Ability to post before login can be added or removed in "settings"->"data entry and display"->"allow posting before logging in".

As for the on login redirect - please try django docs there is probably a setting for the default url. If it does not work for you, please let us know and we'll fix it.

You can also use your own login application by removing the askbot.deps.django_authopenid app from the settings.py and removing the corresponding authentication middleware, then replacing them for your preferred authentication app.

edit flag offensive delete link more

Comments

django has a setting for the post-login default redirect, LOGIN_REDIRECT_URL, and we're using it, for when users aren't in the forums. It's easily overridden by using the next= get request. SO: feature suggestion would be to have the "please sign in" link in askbot have a next= parameter set to ASKBOT_URL (I've sent you a pull request).

for people logging in while posting a question, it may just be too hard...

hjwp gravatar imagehjwp ( 2011-11-24 10:33:51 -0600 )edit

we'll take a look, thanks.

Evgeny gravatar imageEvgeny ( 2011-11-24 10:37:07 -0600 )edit

Would it be better to use the LOGIN_REDIRECT_URL instead or ASKBOT_URL, if the login redirect is not set?

Evgeny gravatar imageEvgeny ( 2011-11-24 11:02:24 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-11-23 12:21:54 -0600

Seen: 6,029 times

Last updated: Nov 23 '11