def save_model(self, request, obj, form, change): from concurrency.exceptions import RecordModifiedError from django.http import HttpResponse try: obj.save() #other stuff
except RecordModifiedError: self.message_user(request, "[!] Record modified. Please try again.", level="error")
return None