I have a django model which I would like to edit/add via the admin site.
The model contains a list of tags which each hold a score. (many-to-many relation).
In addition to the tag, I would like to have another field in the model which will calculate the tags score when committing the model to the database via the admin interface.
So basically I’ll need an event after the commit so I can run over all the model tags and calculate the score.
Is it possible to extend the admin interface in such a way ?
Your best bet is probably overriding
ModelAdmin.save_formset, since that one is called after both the main model and the m2m relations have been saved.