标签: python django
Want to retrieve data from the database in this department ID field which is on another model.
答案 0 :(得分:-1)
如果您使用 django模型表格,这是一种解决方法
我为此给出了链接
Model Choice Field
答案 1 :(得分:-1)
如果使用的是基于类的视图,请通过上下文数据发送部门数据。 否则,您可以在Forms.py