Ticket #11108: contrib-admin-options-py.diff
File contrib-admin-options-py.diff, 893 bytes (added by , 15 years ago) |
---|
-
contrib/admin/options.py
old new 556 556 """ 557 557 obj.save() 558 558 559 def delete_model(self, request, obj): 560 """ 561 Given a model instance delete it from the database. 562 """ 563 obj.delete() 564 559 565 def save_formset(self, request, form, formset, change): 560 566 """ 561 567 Given an inline formset save it to the database. … … 1013 1019 raise PermissionDenied 1014 1020 obj_display = force_unicode(obj) 1015 1021 self.log_deletion(request, obj, obj_display) 1016 obj.delete()1022 self.delete_model(request, obj) 1017 1023 1018 1024 self.message_user(request, _('The %(name)s "%(obj)s" was deleted successfully.') % {'name': force_unicode(opts.verbose_name), 'obj': force_unicode(obj_display)}) 1019 1025