当前位置:网站首页>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
边栏推荐
- Mysql database, inconsistent index character set, slow SQL query, interface timeout
- Source Generator实战
- 可以接收多种数据类型参数——可变参数
- Using positive and negative traversal to solve the problem of "the shortest distance of characters"
- 数据挖掘系列(3)_Excel的数据挖掘插件_估计分析
- 全网讲的最细,软件测试度量,怎样优化软件测试成本提高效率---火爆
- 2022山东省安全员C证上岗证题库及在线模拟考试
- 使用DFS来解决“字典序排数”问题
- 交换二叉树中每个结点的左和右
- LoadRunner - performance testing tool
猜你喜欢

数据挖掘系列(3)_Excel的数据挖掘插件_估计分析

在.NE6 WebApi中使用分布式缓存Redis

2022a special equipment related management (elevator) work license question bank and simulation examination

TP5 email (2020-05-27)

ASP. Net 6 middleware series - Custom middleware classes

MYSQL04_ Exercises corresponding to arithmetic, logic, bit, operator and operator

IOTOS物联中台对接海康安防平台(iSecure Center)门禁系统

OLED multi-level menu record

全网讲的最细,软件测试度量,怎样优化软件测试成本提高效率---火爆

Xutils3 corrected a bug I reported. Happy
随机推荐
ASP. Net 6 middleware series - conditional Middleware
Load view Caton
2022g2 boiler stoker examination question bank and online simulation examination
The most detailed in the whole network, software testing measurement, how to optimize software testing cost and improve efficiency --- hot
The backtracking of stack is used to solve the problem of "the longest absolute path of file"
为什么BI对企业这么重要?
If the deep replication of objects is realized through C #?
TP5 where query one field is not equal to multiple values
Maui initial experience: Cool
MAUI初体验:爽
ASP.NET和ASP.NETCore多环境配置对比
. net core current limiting control - aspnetcoreratelimit
c#语法糖模式匹配【switch 表达式】
搭建XAMPP时mysql端口被占用
be based on. NETCORE development blog project starblog - (2) environment preparation and creation project
MYSQL05_ Ordr by sorting, limit grouping, group by grouping
ASP.NET 6 中间件系列 - 自定义中间件类
Xamarin效果第二十一篇之GIS中可扩展浮动操作按钮
Mysql database, inconsistent index character set, slow SQL query, interface timeout
微软是如何解决 PC 端程序多开问题的
