I have a legacy project that saves models with save
, bulk_create
and other methods within the framework.
What is the best way to set a specific value for an attribute so that every time a record is saved the new value is also saved? This value is constructed based on other attributes of the instance that is being saved.
I pose this question because I'm not sure all ways that save is possible in Django except save
and bulk_create
and knowing that on bulk_create
:
The model’s save() method will not be called, and the pre_save and post_save signals will not be sent.
https://docs.djangoproject.com/en/1.8/ref/models/querysets/#bulk-create