当前位置:网站首页>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
边栏推荐
- Oracle 用户A删除用户B名下的一张表后,用户B可以通过回收站恢复被删除的表吗?
- R language data The table package performs aggregation transforms of data packets and calculates the grouping interquartile range (IQR) of dataframe data
- 传输线理论之相速、相位等的概念
- 线性代数(三)
- 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
- LCP plug-in creates peer-to-peer 802.1ad interface
- After Oracle user a deletes a table under user B's name, can user B recover the deleted table through the recycle bin?
- Difference between NPX and NPM
- PHP warehouse inventory management system source code WMS source code
- Obj file format and.Mtl file format
猜你喜欢

【每日一练】day(14)

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

sqlilabs less-28~less-8a

(牛客多校二)J-Link with Arithmetic Progression(最小二乘法/三分)
![(15)[驱动开发]过写拷贝](/img/1c/68dfff5671add1fe91567e4df34135.png)
(15)[驱动开发]过写拷贝

Working principle and precautions of bubble water level gauge

Leetcode 237. 删除链表中的节点

Leetcode 202. happy number (not happy at all)

Programming hodgepodge (I)

(2022牛客多校)D-Link with Game Glitch(spfa)
随机推荐
Introduction summary of using unirx in unity
(16)[系统调用]追踪系统调用(3环)
Promise implementation
Xiaomi 12s UTRA Leica watermark generation online tool
50: Chapter 5: develop admin management service: 3: develop [query whether the admin user name already exists, interface]; (this interface can only be called when logging in; so we have written an int
Programming hodgepodge (I)
After Oracle user a deletes a table under user B's name, can user B recover the deleted table through the recycle bin?
传输线理论之相速、相位等的概念
Summary of common attributes of flex layout
对于von Mises distribution(冯·米塞斯分布)的一点心得
Microservice - remote invocation (feign component)
R language ggpubr package ggarrange function combines multiple images and annotates_ Figure add annotation, annotation, annotation information for the combined image, and use the right parameter to ad
Array programming problem of CSDN programming challenge
HTB-Optimum
Common methods of JS operation array
y76.第四章 Prometheus大厂监控体系及实战 -- prometheus进阶(七)
Basset: learning the regulatory code of the accessible genome with deep convolutional neural network
AirServer 7.3.0中文版手机设备无线传送电脑屏幕工具
10、渲染基础
R language uses rowmedians function to calculate the row data median value of all data rows in dataframe