0
当我去编辑用户配置文件并上传新的配置文件图片时,它不会显示。相反,我看到以下错误链接断开。为什么我的图片在用Django-Userena上传后不显示?
Page not found (404)
Request Method: GET
Request URL: http://127.0.0.1:8000/site_media/media/mugshots/4cfb402cad.jpg
Using the URLconf defined in dealr.urls, Django tried these URL patterns, in this order:
^$
^admin/
^accounts/
The current URL, site_media/media/mugshots/4cfb402cad.jpg, didn't match any of these.
什么是奇怪,这是我的项目文件夹内其实我也/ site_media /媒体/嫌疑犯照片/和上传(文件名相同)确切的文件,所以我不知道为什么它不显示图片。我是否需要对我的URLS.PY执行某些操作才能查看此文件?这是我能想到的唯一的事情。
你配置你的服务器来提供静态文件吗? 对于调试服务器,它是https://docs.djangoproject.com/en/1.6/howto/static-files/#serving-static-files-during-development – coldmind 2014-09-22 10:20:05