【发布时间】:2017-08-15 18:33:30
【问题描述】:
我正在使用需要在每个页面上更改的横幅图像,我想在 html 模板中设置横幅,以便我为其构建它的人轻松添加新页面。
我正在用 django 开发它,但我不知道如何让它工作,请帮忙!
示例:
index.html
set image url here
{% extends 'base.html' %}
base.html
<html>
<body>
{% include 'top.html %}
</body>
</html>
top.html
<div>
<img src="{{ image url }}">
</div>
【问题讨论】:
标签: html django templates variables