First time here? Check out the FAQ!
1

redirect back to askbot after login via own django app

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?

hjwp's avatar
31
hjwp
asked 2011-11-23 12:21:54 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

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.

Evgeny's avatar
13.2k
Evgeny
answered 2011-11-23 12:32:35 -0500
edit flag offensive 0 remove flag delete link

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's avatar hjwp (2011-11-24 10:33:51 -0500) edit

we'll take a look, thanks.

Evgeny's avatar Evgeny (2011-11-24 10:37:07 -0500) edit

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

Evgeny's avatar Evgeny (2011-11-24 11:02:24 -0500) edit
add a comment see more comments