当前位置:网站首页>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
边栏推荐
- Configure automatic implementation of curd projects
- Mise en service PID du moteur de codage (anneau de vitesse | anneau de position | suivant)
- 2022g2 boiler stoker examination question bank and online simulation examination
- 一套关于 内存对齐 的C#面试题,做错的人很多!
- Due to 3 ²+ four ²= five ², Therefore, we call '3,4,5' as the number of Pythagorean shares, and find the array of all Pythagorean shares within n (including n).
- 编码电机PID调试(速度环|位置环|跟随)
- 7-11 重排链表 (25 分)
- . net core current limiting control - aspnetcoreratelimit
- 使用两种方法来解决“最大回文数乘积”问题
- Ide-idea-problem
猜你喜欢
宁德时代地位不保?
TP5 customization in extend directory succeeded and failed. Return information
【VS Code】解决jupyter文件在vs code中显示异常的问题
《C语言程序设计》(谭浩强第五版) 第8章 善于利用指针 习题解析与答案
The most understandable life cycle of dependency injection
ASP.NET 6 中间件系列 - 自定义中间件类
This new feature of C 11, I would like to call it the strongest!
Due to 3 ²+ four ²= five ², Therefore, we call '3,4,5' as the number of Pythagorean shares, and find the array of all Pythagorean shares within n (including n).
Laravel new route file
TP5 inherits base and uses the variables in base
随机推荐
Tips in MATLAB
EasyUI's combobox implements three-level query
svg标签中利用<polygon/>循环数组绘制多边形
微软是如何解决 PC 端程序多开问题的
【鉴权/授权】自定义一个身份认证Handler
c#语法糖模式匹配【switch 表达式】
数据挖掘系列(3)_Excel的数据挖掘插件_估计分析
[Mysql] LEFT函数 | RIGHT函数
Tencent video VIP member, weekly card special price of 9 yuan! Tencent official direct charging, members take effect immediately!
OLED多级菜单记录
利用正反遍历来解决“字符的最短距离”问题
Laravel's own paging query
搭建XAMPP时mysql端口被占用
The most detailed in the whole network, software testing measurement, how to optimize software testing cost and improve efficiency --- hot
C# 读写二进制文件
be based on. NETCORE development blog project starblog - (2) environment preparation and creation project
Blazor University (12) - component lifecycle
MAUI初体验:爽
If the deep replication of objects is realized through C #?
全网最全,接口自动化测试怎么做的?精通接口自动化测试详解