Ticket #13950: post-save.diff

File post-save.diff, 966 bytes (added by 3point2, 14 years ago)
  • django/contrib/admin/options.py

     
    798798                    self.save_formset(request, form, formset, change=False)
    799799
    800800                self.log_addition(request, new_object)
     801                if hasattr(self, "post_save"):
     802                    self.post_save(new_object)
    801803                return self.response_add(request, new_object)
    802804        else:
    803805            # Prepare the dict of initial data from the request.
     
    899901
    900902                change_message = self.construct_change_message(request, form, formsets)
    901903                self.log_change(request, new_object, change_message)
     904                if hasattr(self, "post_save"):
     905                    self.post_save(new_object)
    902906                return self.response_change(request, new_object)
    903907
    904908        else:
Back to Top