Override save_model on Django InlineModelAdmin

后端 未结 6 1624
星月不相逢
星月不相逢 2020-12-31 03:38

I have a model that has a user field that needs to be auto-populated from the currently logged in user. I can get it working as specified here if the user

6条回答
  •  不思量自难忘°
    2020-12-31 04:12

    Only the save_model for the model you're editing is executed, instead you will need to use the post_save signal to update inlined data.

    (Not really a duplicate, but essentially the same question is being answered in Do inline model forms emmit post_save signals? (django))

提交回复
热议问题