First time here? Check out the FAQ!
1

askbot gunicorn 404 error
 

INSTALLED_APPS = ( ... "gunicorn", )

then run

python manage.py run_gunicorn

error as follows

 >python manage.py run_gunicorn 0.0.0.0:8000

2013-01-06 06:25:06 [16815] [INFO] Starting gunicorn 0.17.1
2013-01-06 06:25:06 [16815] [INFO] Listening at: http://0.0.0.0:8000 (16815)
2013-01-06 06:25:06 [16815] [INFO] Using worker: sync
2013-01-06 06:25:06 [16820] [INFO] Booting worker with pid: 16820
WARNING!!! You are using a 'locmem' (local memory) caching backend,
which is OK for a low volume site running on a single-process server.
For a multi-process configuration it is neccessary to have a production
cache system, such as redis or memcached.

With local memory caching and multi-process setup you might intermittently
see outdated content on your site.

/home/ubuntu/.virtualenvs/web/local/lib/python2.7/site-packages/coffin/common.py:73: UserWarning: Cannot translate loader: askbot.skins.loaders.Loader
  warnings.warn('Cannot translate loader: %s' % loader)

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
jerry_gzy's avatar
53
jerry_gzy
asked 12 years ago, updated 12 years ago

Comments

I'm having the same problems; does anyone know how to fix it?

kate_r's avatar kate_r (11 years ago)
see more comments

1 Answer

0

i am not so sure this is the answer, but give it a try

there is a stackoverflow post regarding gunicorn serving statics

http://stackoverflow.com/questions/10862259/can-django-run-on-gunicorn-alone-no-apache-or-nginx

it says:

urlpatterns = patterns('',
# ... the rest of your URLconf goes here ...
) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

and the askbot code says

10 
11 urlpatterns = patterns('',
12     (r'%s' % settings.ASKBOT_URL, include('askbot.urls')),
13     (r'^admin/', include(admin.site.urls)),
14     #(r'^cache/', include('keyedcache.urls')), - broken views disable for now
15     (r'^settings/', include('askbot.deps.livesettings.urls')),16     (r'^followit/', include('followit.urls')),
17     (r'^robots.txt$', include('robots.urls')),
18     url( # TODO: replace with django.conf.urls.static ?
19         r'^%s(?P<path>.*)$' % settings.MEDIA_URL[1:],
20         'django.views.static.serve',
21         {'document_root': settings.MEDIA_ROOT.replace('\\','/')},
22     ),
23 ) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
24

I am not a develper of askbot but the TODO there looks like some thing related. please let me know if my guess is on the spot, thx.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
jerry_gzy's avatar
53
jerry_gzy
answered 12 years ago
link

Comments

see more comments