Answer the question
In order to leave comments, you need to log in
Save object immediately when adding via admin panel?
I ran into a problem: you need to save the model object immediately after the user goes to the /add/ page in the admin panel. That is, so that it already has a primary key (committing to the database is not critical).
Roughly speaking, I need object_id and content_type_id, which in the standard implementation are available only when "editing" an object, and not when adding it.
Tried to do it via post_init signal, but for some unknown reason it creates multiple objects, not just one.
Ideas?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question