python - Serving django Admin files with Apache and mod_wsgi -
i'm having trouble getting apache serve admin media django (using ver. 1.1). admin_media_prefix set default:
admin_media_prefix = '/media/'
and i've modified apache setup:
alias /media/ /usr/lib/pymodules/python2.6/django/contrib/admin/media/ <directory /usr/lib/pymodules/python2.6/django/contrib/admin/media/> allowoverride none options none order allow,deny allow </directory>
i'm not entirely sure what's going on here , why isn't working. i've seen lot of questions asked, can not determine why i'm still having problem.
edit: apache logs
[sun mar 11 20:14:18 2012] [notice] graceful restart requested, doing restart [sun mar 11 20:14:18 2012] [error] exception keyerror: keyerror(-1220142448,) in <module 'threading' '/usr/lib/python2.6/threading.pyc'> ignored [sun mar 11 20:14:18 2012] [error] exception keyerror: keyerror(-1220142448,) in <module 'threading' '/usr/lib/python2.6/threading.pyc'> ignored [sun mar 11 20:14:18 2012] [error] exception keyerror: keyerror(-1220142448,) in <module 'threading' '/usr/lib/python2.6/threading.pyc'> ignored [sun mar 11 20:14:18 2012] [error] exception keyerror: keyerror(-1220142448,) in <module 'threading' '/usr/lib/python2.6/threading.pyc'> ignored [sun mar 11 20:14:18 2012] [error] exception keyerror: keyerror(-1220142448,) in <module 'threading' '/usr/lib/python2.6/threading.pyc'> ignored [sun mar 11 20:14:18 2012] [notice] apache/2.2.14 (ubuntu) php/5.3.2-1ubuntu4.14 suhosin-patch mod_wsgi/2.8 python/2.6.5 configured -- resuming normal operations [sun mar 11 20:14:23 2012] [error] exception keyerror: keyerror(-1220142448,) in <module 'threading' '/usr/lib/python2.6/threading.pyc'> ignored [sun mar 11 20:14:23 2012] [error] exception keyerror: keyerror(-1220142448,) in <module 'threading' '/usr/lib/python2.6/threading.pyc'> ignored [sun mar 11 20:14:35 2012] [error] exception keyerror: keyerror(-1220142448,) in <module 'threading' '/usr/lib/python2.6/threading.pyc'> ignored
django 1.3 added new cotrib app django.contrib.staticfiles:
https://docs.djangoproject.com/en/dev/releases/1.4/
"django expect find admin static files under url /admin/", admin_media_prefix deprecated - alias in apache setup sufficient, ex:
alias /static/admin/ /usr/lib/pymodules/python2.6/django/contrib/admin/media/
this works me.
Comments
Post a Comment