views中访问HTML静态页面·相对路径
在views定义的函数中访问指定的静态HTML页面
写的相对路径
def visit_testing(request):
return render(request, 'index_app/testing.html')

在HTML页面中引入CSS样式表·相对路径

{%load static %}
<link rel="stylesheet" href={%static "frstyle/index.css"%}>
html中传动态路径
2018年10月10号 11:15 分页的实现
{% url '命名空间:路径名' as 变量名 %}
{% 函数名 变量名 %}

通过关键字传参:pn = pn
或位置传参:

网友评论