{{ forloop.counter }}解决排序
反向解析静态文件
{% load staticfiles %}
<img src="{% static 'image/shuaige.jpeg' %}">
编写模板:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<img src="/static/image/shuaige.jpeg" alt="">
{% load staticfiles %}
<img src="{% static 'image/shuaige.jpeg' %}">
</body>
</html>
网友评论