Задать вопрос

Тел: +7 965 3737 888

446

Просмотров

0

Ответов

ManyToMany field with newforms

In editing a ManyToMany field in a form, it is necessary to clear the entries in the bridge table before adding new entries. So first save the new entries, remove the old entries in the multiple choice field and then add the new entries. It is also necessary to add the commit_on_success decorator to make sure that the whole process is in one transaction.

Вопрос полезен? Да0/Нет0
file_5139.py(1.8Кб)
None