Django最强大的部分之一是自动管理界面。它从模型中读取元数据,以提供一个快速的,以模型为中心的界面,受信任的用户可以在其中管理您网站上的内容。管理员的建议用法仅限于组织的内部管理工具。...lyshark"
return render(request,"index.html",{"user":username,"pasd":password,"title":title})
后端组装数据然后传递给前端...": password,
"title": title
}
return render(request,"index.html",dict)
通过info变量遍历出指定字段元素...3.在我们需要使用自定义过滤器的时候,必须在index.html中引入这个变量,然后在前端就可以调用了.
# name: views.py
def index(request):
title...中的视图函数,默认我们返回base.html这个页面.
from django.shortcuts import render
from django.shortcuts import HttpResponse