当前位置:网站首页>Context must be a dict rater solution
Context must be a dict rater solution
2022-07-25 05:45:00 【Shura_】
Original code
def depart_edit(request, nid):
# Revision Department
# According to the obtained nid Query the database
row = models.Department.objects.filter(id=nid).first()
# Forward data row To depart_edit.html
return render(request, 'depart_edit.html', row)
Finally, I found out the problem render() The third parameter should be in object form
def depart_edit(request, nid):
# Revision Department
# According to the obtained nid Query the database
row = models.Department.objects.filter(id=nid).first()
# Forward data row To depart_edit.html
return render(request, 'depart_edit.html', {
"row":row})
Perfect solution
边栏推荐
- y76.第四章 Prometheus大厂监控体系及实战 -- prometheus进阶(七)
- (牛客多校二)J-Link with Arithmetic Progression(最小二乘法/三分)
- Amazoncaptcha 95%成功率绕过亚马逊IP验证码
- Get URL of [url reference]? For the following parameters, there are two ways to get the value of the corresponding parameter name and convert the full quantity to the object structure
- 剑指 Offer 54. 二叉搜索树的第k大节点
- Realsense D435i 深度图优化_高精度模式
- C编程 --“最大子数组的和” 的动态规划的解法
- Leetcode 204. 计数质数(太妙了)
- The difference between $write and $display in SystemVerilog
- Y76. Chapter IV Prometheus large factory monitoring system and practice -- Prometheus advanced (VII)
猜你喜欢

剑指 Offer 36. 二叉搜索树与双向链表

Talk about how redis handles requests

基于ISO13209(OTX)实现EOL下线序列

50 places are limited to open | with the news of oceanbase's annual press conference coming!

Amazoncaptcha 95%成功率绕过亚马逊IP验证码

Leetcode 237. delete nodes in the linked list

CCID released the "Lake warehouse integrated technology research report", and Jushan database was selected as a typical representative of domestic enterprises

Basset: learning the regulatory code of the accessible genome with deep convolutional neural network

HTB-Arctic
![Get URL of [url reference]? For the following parameters, there are two ways to get the value of the corresponding parameter name and convert the full quantity to the object structure](/img/78/2a4e9d49bee8ef839d9d86fc7c3c83.png)
Get URL of [url reference]? For the following parameters, there are two ways to get the value of the corresponding parameter name and convert the full quantity to the object structure
随机推荐
School day (summer vacation daily question 2)
动态规划学习笔记
C编程 --“最大子数组的和” 的动态规划的解法
Automatic usage in SystemVerilog
Why is it that all the games are pseudorandom and can't make true random?
The computer accesses the Internet normally with the same network cable, and the mobile phone connects to WiFi successfully, but it cannot access the Internet
Flexible layout summary
MATLAB作图实例:5:双轴图
Switch NPM source to private source library
C Programming -- the solution of dynamic programming of "the sum of the largest subarray"
VIM configuring golang development environment
HTB-Devel
Calculate BDP value and wnd value
R language obtains the data row where the nth maximum value of the specified data column is located in the data.table data
sqlilabs less-29
QT qtextedit setting qscrollbar style sheet does not take effect solution
HTB-Beep
HTB-Granpa
HTB-Arctic
Common methods of JS operation array