Django 标签式加载静态文件
>seeting
.py
STATIC_URL
= '/static/'
STATICFILES_DIRS
= (
os
.path
.join
(BASE_DIR
, "static"),
)
>xxx
.html
{% load staticfiles
%}
{% static
'css/reset.css' %}
Django 页内跳转
>urls
.py
urlpatterns
= [
path
('login/', LoginView
.as_view
(), name
="login"),
]
>xxx
.html
{% url
'login' %}
转载请注明原文地址: https://yun.8miu.com/read-18025.html