In my opinion, you can use Signals . A post_save in this case. Thus, you save the logic of creating and deleting an object separately.
Since you want the oldest be deleted, I assume that you have a created field in the model.
Once you save ,
def my_handler(sender, instance, **kwargs): qs = MyModel.objects.order_by('created')
Of course, nothing prevents you from using the pre_save signal, but use it only if you are absolutely sure that the save method will not work.
source share