0
采取这样一个简单的观点:Django的模板图像
def my_gallery(request):
images= ?
t = Template("<html><body>Here my images from XY {{ images }}.</body></html>")
html = t.render(Context({'images': ? }))
return HttpResponse(html)
我如何有定义变量图像/我有什么填写语境 使Django的显示我:
1图像 超过1图像 1音效档 超过1声音文件在网站上my_gallery
谢谢!
目前尚不清楚你想在这里做什么。你想让视图渲染字符串“1图像多于一个图像...”吗? – godswearhats 2010-07-16 14:48:38
我试图在一个网址上显示一个或多个图像(= jpeg,gif等)和或soundfiles – MacPython 2010-07-19 07:12:05