M
M
meowmere2020-12-21 15:39:57
Django
meowmere, 2020-12-21 15:39:57

Django signals, how to pull m2m id before sending data?

There is a problem with Django, namely signal.

There is a model in which there is a field m2m. After creating a new record, it is necessary to pull out all id with m2m and create new records with these id in another table. On post_save, django makes a query query, but makes it to the m2m table, but the data has not yet entered it, because post_save does before inserting data into m2m table How to implement this?

m2m_change - the debugger does not stop when adding an entry.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Goryachev, 2017-02-03
@MRcracker

https://jsfiddle.net/webirus/9g0om5dp/1/

D
Denis Ineshin, 2017-02-03
@IonDen

Ribbon CSS Generator

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question