假如从a.html 跳到https://blog.csdn.net/Sugar_yjl/article/details/index.html。
那么在html中可以直接href=“https://blog.csdn.net/Sugar_yjl/article/details/index.html”
假如以下是a.html然后可以这么写:
页面跳转Django页面跳转
urls.py:
path("https://blog.csdn.net/Sugar_yjl/article/details/index", views.https://blog.csdn.net/Sugar_yjl/article/details/index), # 主页
在Django中的a.html就要写成:
页面跳转 这个https://blog.csdn.net/Sugar_yjl/article/details/index是上面urls.py文件中的https://blog.csdn.net/Sugar_yjl/article/details/index
而不能写成上面的https://blog.csdn.net/Sugar_yjl/article/details/index.html
views.py:
from django.shortcuts import render
def https://blog.csdn.net/Sugar_yjl/article/details/index(request):
response = render(request, "https://blog.csdn.net/Sugar_yjl/article/details/index.html")
return response
Django和HTML的页面跳转的区别:a标签中href的修改。
以上就是Django和HTML的页面跳转的区别。



