Ask Your Question
1

How to run askbot under a subdirectory?

asked 2011-06-09 03:50:56 -0500

Fabio gravatar image

Askbot I installed on a server (CentOS + Apache) with a single IP address. On the same server are running the main site (php) and a Django site (version 1.3). Django Django is served under the subdirectory / (defined by the Directive WSGIScriptAlias ​​/ django) I would like to serve in a subdirectory askbot / forum, but even if they define the WSGIScriptAlias ​​/ forum url media continue to point to / m, while it should point to / forum / m Can anyone help me?

Fabio

edit retag flag offensive close merge delete

6 answers

Sort by » oldest newest most voted
1

answered 2011-06-18 15:40:59 -0500

Fabio gravatar image

I have just run the command python manage.py add_missing_subscriptions and I think that there is a typo. I get the error is AttributeError: type object 'User' has no attribute 'object' and infact in the script add_missing_subscriptions there is the command User.object.all() that instead should be User.objects.all()

edit flag offensive delete link more

Comments

Ok, just fixed this on the github repo. Thanks!
Evgeny gravatar imageEvgeny ( 2011-06-18 15:43:13 -0500 )edit
1

answered 2011-06-18 15:07:35 -0500

Fabio gravatar image

Solved! There was a line with USE_I18N = False. When I set USE_I18N to True the problem got solved.

edit flag offensive delete link more

Comments

Great, thanks I've added a startup check that makes sure that USE_I18N is True, this problem won't show up again.
Evgeny gravatar imageEvgeny ( 2011-06-18 15:31:46 -0500 )edit
0

answered 2011-06-13 18:11:07 -0500

Fabio gravatar image

Nobody can help me?

Fabio

edit flag offensive delete link more

Comments

Fabio, sorry I was offline for a while, can you skype me or call?
Evgeny gravatar imageEvgeny ( 2011-06-13 19:25:35 -0500 )edit
evgeny-fadeev 949-824-5842 (US), or email evgeny.fadeev@gmail.com I need more details from you to be able to help.
Evgeny gravatar imageEvgeny ( 2011-06-13 19:26:00 -0500 )edit
Your problem seems to be related to the webserver deployment, I'd make ASKBOT_URL /forum and WSGI script alias /, but the details may depend on your intentions and an what else you have on the same site.
Evgeny gravatar imageEvgeny ( 2011-06-13 19:28:48 -0500 )edit
just noticed that using /forum root url breaks two test cases! will fix them tomorrow. for example logo upload does not work.
Evgeny gravatar imageEvgeny ( 2011-06-15 03:44:17 -0500 )edit
0

answered 2011-06-09 16:02:13 -0500

Fabio gravatar image

Thanks for your reply.

WSGIScriptAlias ​​If set to '/ forum' and ASKBOT_URL to 'forum /' images are served to the URL '/ forum / forum / m / default / media / images /' (eg forum / forum / m / default / media / images / cc-Wiki.png? v = 1) but the URL is written by askbot '/ forum / m / default / media / images'.

If, instead, I set WSGIScriptAlias to '/' and ASKBOT_URL to 'forum /', askbot load properly, but I am no longer able to access my django site through the url http://localhost/django.

Fabio

edit flag offensive delete link more

Comments

What do you expect to see at your /django url? I think WSGIScriptAlias "/" and ASKBOT_URL="forum/" should work, but if you need to see something at /django some view must be registered at that url in urls.py. Do you have anything besides a django project at your site (any other application - like a blog or anything else)? Sorry for the delay.
Evgeny gravatar imageEvgeny ( 2011-06-09 20:38:36 -0500 )edit
@Fabio, any success so far?
Evgeny gravatar imageEvgeny ( 2011-06-10 23:59:56 -0500 )edit
0

answered 2011-06-18 15:06:17 -0500

Fabio gravatar image

Hi, Evgeny,

as suggested by you I try to install askbost as an app of django but without success. I have this error:

    [Sat Jun 18 16:47:12 2011] [error]   warnings.warn('Cannot translate loader: %s' % loader)
[Sat Jun 18 16:47:12 2011] [error] /usr/lib/python2.6/site-packages/Coffin-0.3.4-py2.6.egg/coffin/common.py:49: UserWarning: Cannot translate loader: askbot.skins.loaders.load_template_source
[Sat Jun 18 16:47:12 2011] [error]   warnings.warn('Cannot translate loader: %s' % loader)
[Sat Jun 18 16:47:12 2011] [error] [client 2.225.106.8] mod_wsgi (pid=16245): Exception occurred processing WSGI script '/opt/djroot/djadmin/apache/django.wsgi'.
[Sat Jun 18 16:47:12 2011] [error] [client 2.225.106.8] Traceback (most recent call last):
[Sat Jun 18 16:47:12 2011] [error] [client 2.225.106.8]   File "/usr/lib/python2.6/site-packages/django/core/handlers/wsgi.py", line 250, in __call__
[Sat Jun 18 16:47:12 2011] [error] [client 2.225.106.8]     self.load_middleware()
[Sat Jun 18 16:47:12 2011] [error] [client 2.225.106.8]   File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py", line 45, in load_middleware
[Sat Jun 18 16:47:12 2011] [error] [client 2.225.106.8]     mod = import_module(mw_module)
[Sat Jun 18 16:47:12 2011] [error] [client 2.225.106.8]   File "/usr/lib/python2.6/site-packages/django/utils/importlib.py", line 35, in import_module
[Sat Jun 18 16:47:12 2011] [error] [client 2.225.106.8]     __import__(name)
[Sat Jun 18 16:47:12 2011] [error] [client 2.225.106.8]   File "/usr/lib/python2.6/site-packages/askbot-0.6.95-py2.6.egg/askbot/middleware/view_log.py", line 12, in <module>
[Sat Jun 18 16:47:12 2011] [error] [client 2.225.106.8]     from askbot.views.readers import questions as questions_view
[Sat Jun 18 16:47:12 2011] [error] [client 2.225.106.8]   File "/usr/lib/python2.6/site-packages/askbot-0.6.95-py2.6.egg/askbot/views/__init__.py", line 4, in <module>
[Sat Jun 18 16:47:12 2011] [error] [client 2.225.106.8]     from askbot.views import readers
[Sat Jun 18 16:47:12 2011] [error] [client 2.225.106.8]   File "/usr/lib/python2.6/site-packages/askbot-0.6.95-py2.6.egg/askbot/views/readers.py", line 36, in <module>
[Sat Jun 18 16:47:12 2011] [error] [client 2.225.106.8]     from askbot.templatetags import extra_tags
[Sat Jun 18 16:47:12 2011] [error] [client 2.225.106.8]   File "/usr/lib/python2.6/site-packages/askbot-0.6.95-py2.6.egg/askbot/templatetags/extra_tags.py", line 8, in <module>
[Sat Jun 18 16:47:12 2011] [error] [client 2.225.106.8]     from askbot.skins.loaders import get_template
[Sat Jun 18 16:47:12 2011] [error] [client 2.225.106.8]   File "/usr/lib/python2.6/site-packages/askbot-0.6.95-py2.6.egg/askbot/skins/loaders.py", line 121, in <module>
[Sat Jun 18 16:47:12 2011 ...
(more)
edit flag offensive delete link more
0

answered 2011-06-09 12:13:48 -0500

Evgeny gravatar image

Hi there, yes it should work - in settings.py set ``ASKBOT_URL='somedir/'.

There must be no leading slash in the parameter. This setting was not tested recently, please give your feedback if you have any issues.

edit flag offensive delete link more

Your Answer

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

Add Answer

[hide preview]

Question Tools

1 follower

Stats

Asked: 2011-06-09 03:50:56 -0500

Seen: 1,146 times

Last updated: Jun 18 '11