社区所有版块导航
Python
python开源   Django   Python   DjangoApp   pycharm  
DATA
docker   Elasticsearch  
aigc
aigc   chatgpt  
WEB开发
linux   MongoDB   Redis   DATABASE   NGINX   其他Web框架   web工具   zookeeper   tornado   NoSql   Bootstrap   js   peewee   Git   bottle   IE   MQ   Jquery  
机器学习
机器学习算法  
Python88.com
反馈   公告   社区推广  
产品
短视频  
印度
印度  
Py学习  »  问与答

用mezzanine创建的demo无法显示图片,请问是什么原因?

gc • 10 年前 • 6844 次点击  

the demo

求指导 我是在windows下使用的django,用mezzanine创建的demo为什么无法显示 图片 点击图片显示 the image could not be loaded.

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/408
 
6844 次点击  
文章 [ 6 ]  |  最新文章 10 年前
gc
Reply   •   1 楼
gc    10 年前

MEDIA_URL = "/static/media/"

三画儿
Reply   •   2 楼
三画儿    10 年前

你配置文件里指定了media对应的路径了么

gc
Reply   •   3 楼
gc    10 年前

我用firebug检查图片的路径,显示‘载入图片URL失败’

Page not found (404) Request Method: GET Request URL:

'media\uploads\qq图片20140310162703.jpg' could not be found

You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 404 page.

Py站长
Reply   •   4 楼
Py站长    10 年前

@gc 看下日志怎么输出的? mezzanine

gc
Reply   •   5 楼
gc    10 年前

<a target="_blank" href="/static/media/uploads/gallery/Venice%2C%20Italy.jpg">Venice, Italy.jpg</a>路径是这样的,可是还是无法显示。

robin_chenyu
Reply   •   6 楼
robin_chenyu    10 年前

用firebug查下图片路径对不。