Tag Archives: django admin

Updating m2m after saving a model in Django admin

I wanted to ensure that a many-to-many field on my model contained a value that was on a foreign key field on the model whenever that model was saved in the admin, like so:

I thought this was a trivial task. I added this code to a post_save signal connected the model, but theā€¦ Read More »