我使用的是django和jssor。
当我使用jssor幻灯片转场时,如果我使用“media”文件夹中的图像,图像将消失,然后显示。如果我使用“static”文件夹中的图片,将会有。
有人能告诉我为什么吗?
Django模型:
class Banner(models.Model):
image = models.FileField(upload_to='Banner/%Y_%m_%d')
link = models.TextField()
Django模板:
...
<div ...>
{% for banner in ban
django--当media_root位于项目根目录之外时,oscar没有显示产品的图片,因此将media_root更改为project /public/media会引发此错误。
SuspiciousFileOperation at /index/
The joined path (.../barbaranew/media/media_root/images/products/malaysian1.png) is located outside of the base path component (.../barbaranew/barbaralee_site/public/media)
另
当我去编辑一个用户资料并上传一个新的资料图片时,它没有显示出来。相反,我看到一个断开的链接,并显示以下错误。
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 cur
有人能给我解释一下为什么下面的代码没有在current_count变量中添加值吗?另外,我正在使用django 1.3版。下面的代码给出了以下输出。
“图像”
10
“图像”
10
“图像”
。。。
" image“表示显示的是实际的图像。
我想要的是“只显示4张图片”。
{% with current_count=0 %}
{% for row in people|slice:":4" %}
{% if row %}
{% for event in row %}
{% if curren
我使用jquery form plugin 通过ajax上传图片到服务器端使用Django编程。上传图片时,我使用这个jquery插件来设置图片的全页背景。图像被上传并存储,但图像不显示为背景。
它显示以下错误:
http://127.0.0.1:8000/cover/'http://localhost:8000/files/backgrounds/2_17.jpg'
404 NOT FOUND
但是当我像这样硬编码url时,例如:(用于检查)
$.backstretch('http://localhost:8000/files/backgrounds/2_17.jpg