1. 引入messages模块 from django.contrib import messages 2. 把messages写入view中 @csrf_exemptdef search(request): if request.method == GET: bookname = request.GET.get(bookname) bookinfo = Book.objects.filter(bookname=bookname) is_staff = re
1. 引入messages模块
2. 把messages写入view中
3. 把messages渲染到页面中
|
2019-06-18
2019-07-04
2021-05-23
2021-05-27
2021-05-27