我的图像文件来自:
imgage = models.ImageField(upload_to="site_media/media")
但如果我在模板 url 中显示这张照片到照片是:
bad url = http://127.0.0.1:8000/photo/site_media/media/django__white_and_green__by_aruseni-d59g56q.png
correct url = http://127.0.0.1:8000/site_media/media/django__white_and_green__by_aruseni-d59g56q.png
如何从此网址中删除“照片”?
<img src="{{ p.img.url }}"/>