Ask Your Question
1

redirect back to askbot after login via own django app

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

hjwp gravatar image hjwp
31 4 1 6

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?

delete close flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

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

Evgeny gravatar image Evgeny flag of Chile
11074 50 84 182
http://askbot.org/

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.

link publish delete flag offensive edit

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

we'll take a look, thanks.

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 ( 2011-11-24 11:02:24 -0500 )edit

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Reliable Askbot Hosting

Create your Q&A site at askbot.com. Managed Askbot hosting at just $15/mo. Dedicated hosting, support contracts, consulting services.

create your Q&A site
30 days free trial

Question tools

Follow

subscribe to rss feed

Stats

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

Seen: 123 times

Last updated: Nov 23 '11