当前位置:网站首页>Eight elder brothers chronicle [4]
Eight elder brothers chronicle [4]
2022-04-23 03:13:00 【A happy wild pointer D】
1. Browser console Report 403 error ,pycharm Report errors :Forbidden (CSRF cookie not set.): /login.html


resolvent : find setting.py This line in the file , Comment it out .

2. Report errors :AttributeError: 'QuerySet' object has no attribute 'uid'

reason : Use filter() Method gets a from the database QuerySet, No User object , No, uid attribute
user = models.User.objects.filter(uid=uid)
if user:
if user.uid == uid and user.upwd == upwd:
res = {
"msg": " Landing successful ",
"success": True
}
else:
res = {
"msg": " Wrong user name or password ",
"success": False
}
resolvent : from QuerySet Get specific User Object can .
3. Report errors :DoesNotExist: User matching query does not exist/
reason : Not in the admin.py Register as defined in model, This error is reported when no value is found during query .
resolvent : After defining model I'll go later admin.py Register in .

版权声明
本文为[A happy wild pointer D]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220627537857.html
边栏推荐
- This new feature of C 11, I would like to call it the strongest!
- 利用正反遍历来解决“字符的最短距离”问题
- 2022年做跨境电商五大技巧小分享
- Using stack to solve the problem of "mini parser"
- [authentication / authorization] customize an authentication handler
- Source Generator实战
- 7-11 重排链表 (25 分)
- 2022A特种设备相关管理(电梯)上岗证题库及模拟考试
- 全网讲的最细,软件测试度量,怎样优化软件测试成本提高效率---火爆
- 《C语言程序设计》(谭浩强第五版) 第8章 善于利用指针 习题解析与答案
猜你喜欢

2022年度Top9的任务管理系统

ASP.NET 6 中间件系列 - 执行顺序

Top ten project management software similar to JIRA

可以接收多种数据类型参数——可变参数

Fight leetcode again (290. Word law)

ASP. Net and ASP NETCORE multi environment configuration comparison

二进制文件版本控制工具选择难?看完这篇你会找到答案

How does Microsoft solve the problem of multiple PC programs

LNMP MySQL allows remote access

Xamarin effect Chapter 21 expandable floating operation button in GIS
随机推荐
Simple example of using redis in PHP
TP5 where query one field is not equal to multiple values
MYSQL_ From mastery to abandonment
Detailed log display of openfeign call
Improvement of ref and struct in C 11
Fundamentals of software testing and development
《C语言程序设计》(谭浩强第五版) 第8章 善于利用指针 习题解析与答案
Configure automatic implementation of curd projects
xutils3修改了我提报的一个bug,开心
腾讯视频VIP会员,周卡特价9元!腾讯官方直充,会员立即生效!
Recommend reading | share the trader's book list and ask famous experts for trading advice. The trading is wonderful
Data mining series (3)_ Data mining plug-in for Excel_ Estimation analysis
利用正反遍历来解决“字符的最短距离”问题
How does Microsoft solve the problem of multiple programs on PC side -- internal implementation
Use split to solve the "most common words" problem
Find the number of leaf nodes of binary tree
The whole network is the most complete. How to do interface automation test? Proficient in interface automation test details
What kind of experience is it to prepare for a month to participate in ACM?
Maui initial experience: Cool
ASP.NET和ASP.NETCore多环境配置对比
