First time here? Check out the FAQ!
1

what is ASKBOT_URL setting supposed to do?

what is the setting ASKBOT_URL setting supposed to do?

###########################
#
#   this will allow running your forum with url like http://site.com/forum
#
#   ASKBOT_URL = 'forum/'
#
ASKBOT_URL = '' #no leading slash, default = '' empty string
  • My requirement is to — host askbot in a subpath like: mysite.com/forum
  • And mysite.com/ will host some another webapp(say, a wordpress CMS)

Basically I'm running multiple webapps under the same domain, but each webapp is hosted within a unique sub-path.

Thanks.

pajju's avatar
565
pajju
asked 2013-06-08 10:18:13 -0600, updated 2013-06-08 10:20:09 -0600
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

1

Like you might have suspected, this is for hosting askbot at sub-url.

You might also need to add FORCE_SCRIPT_NAME setting to keep the url prefix of the original request.

Here is a blog post explaining how this can be done (there are other posts too):

http://lazylabs.org/blog/django-under-sub-url-powered-by-uwsgi-behind-nginx/

The ASKBOT_URL is used in the urls.py file and is needed for the routing as well as for the correct result of reverse() calls - so that all urls printed in the html output have the prefix.

Evgeny's avatar
13.2k
Evgeny
answered 2013-06-08 10:27:26 -0600
edit flag offensive 0 remove flag delete link

Comments

Thanks.

Yeah, we can set FORCE_SCRIPT_NAME = "/subpath" and this should handle everything right, i.e internal app routing.

But, In what cases, do we need to touch ASKBOT_URL?

pajju's avatar pajju (2013-06-08 10:52:23 -0600) edit
1

The ASKBOT_URL is necessary if you use stock urls.py - otherwise - depending on how you've built the urls config file.

Evgeny's avatar Evgeny (2013-06-08 11:03:22 -0600) edit
add a comment see more comments