简体   繁体   English

显示确认django管理员视图

[英]display a confirmation django admin view

Will be possible to display a confirmation hearing to modify a record in a table, as is done when you delete a record? 是否可以显示确认听证会,以修改表中的记录,就像删除记录时一样?

As to modify a record and press the button save this did not request any confirmation or performs the action. 至于修改记录并按下保存按钮,这并不要求任何确认或执行操作。

Find out what would have to occupy the pre_save() , but I could not make the confirmation hearing 找出必须占用pre_save() ,但我无法进行确认听证

https://docs.djangoproject.com/en/dev/ref/signals/#pre-save https://docs.djangoproject.com/en/dev/ref/signals/#pre-save

In the formtools contrib package you'll find form-preview , which is a class that lets you load a form, preview it, and then provides hooks to do whatever you would like with the cleaned form data. formtools contrib程序包中,您将找到form-preview ,这是一个类,可让您加载表单,预览表单,然后提供钩子以对清理的表单数据执行任何操作。

It takes care of the following flow: 它照顾以下流程:

  1. Load a form. 加载表格。
  2. Let people fill it in. 让人们填写。
  3. Show a preview page, where you can edit the form. 显示预览页,您可以在其中编辑表单。
  4. Confirm button, which you can hook into to do whatever needs to be done with the form. 确认按钮,您可以使用它来完成表单所需的任何操作。

This would solve your confirmation problem. 这样可以解决您的确认问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM