首页
\
问答
\
Django:在没有覆盖数据库的情况下更新没有表单的模式(Django: update modal without form without overwrite database)
Django:在没有覆盖数据库的情况下更新没有表单的模式(Django: update modal without form without overwrite database)
我需要使用3个bootstrap模式来更新django模型。 我使用AJAX请求来修改这个值。
在每一步我修改一个字段,但用户可以取消de过程,所以我只想保存更改到数据库,当他们确认在最后一个模式的行动。
我怎样才能做到这一点,而不使用表单? 只有model.field = new_value语法。
I need to update a django model using 3 bootstrap modals. I use AJAX requests to modify this values.
In every step I modify one field, but users can cancel de process so I only want to save changes into db when they confirm the action in the last modal.
How can I do this without using forms? Only model.field = new_value syntax.
原文:https://stackoverflow.com/questions/49710879
更新时间:2022-03-30 12:03