一.登录页面 from django.contrib import admin from django.urls import path from blog import views urlpatterns = [ path('admin/', admin.site.urls), path('login/', views.login), ] urls.py 创建login视图函数 from django.shortcuts import render # Create your views he…