如题。本地manage.py runserver是正常的。谁能帮帮我呀。
效果见
http://www.gentoogle.comsettings把media_root改成绝对路径了。
MEDIA_ROOT = path.join(path.dirname(__file__),'/var/www/localhost/htdocs/pylogs/media')
apache是按下面配的。
<Location "/">
PythonPath "sys.path + ['/var/www/localhost/htdocs/pylogs']"
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE settings
PythonOption django.root /var/www/localhost/htdocs/pylogs
PythonDebug On
PythonPath "['/var/www/localhost/htdocs/pylogs/'] + sys.path"
</Location>
<Location "/media">
SetHandler None
</Location>
<LocationMatch "\.(jpg|gif|png)$">
SetHandler None
</LocationMatch>