Ticket #1089: patch.diff
File patch.diff, 2.0 KB (added by , 19 years ago) |
---|
-
django/contrib/admin/views/main.py
646 646 log.log_action(request.user.id, opts.get_content_type_id(), object_id, obj_display, log.DELETION) 647 647 request.user.add_message(_('The %(name)s "%(obj)s" was deleted successfully.') % {'name':opts.verbose_name, 'obj':obj_display}) 648 648 return HttpResponseRedirect("../../") 649 return render_to_response('admin/delete_confirmation',{649 extra_context = { 650 650 "title": _("Are you sure?"), 651 651 "object_name": opts.verbose_name, 652 652 "object": obj, 653 653 "deleted_objects": deleted_objects, 654 654 "perms_lacking": perms_needed, 655 }, context_instance=Context(request)) 655 } 656 return render_to_response(["admin/%s/%s/delete_confirmation" % (app_label, opts.object_name.lower() ), 657 "admin/%s/delete_confirmation" % app_label , 658 "admin/delete_confirmation"], extra_context, context_instance=Context(request)) 656 659 delete_stage = staff_member_required(delete_stage) 657 660 658 661 def history(request, app_label, module_name, object_id): … … 661 664 order_by=("action_time",), select_related=True) 662 665 # If no history was found, see whether this object even exists. 663 666 obj = get_object_or_404(mod, pk=object_id) 664 return render_to_response('admin/object_history',{667 extra_context = { 665 668 'title': _('Change history: %s') % obj, 666 669 'action_list': action_list, 667 670 'module_name': capfirst(opts.verbose_name_plural), 668 671 'object': obj, 669 }, context_instance=Context(request)) 672 } 673 return render_to_response(["admin/%s/%s/object_history" % (app_label, opts.object_name.lower() ), 674 "admin/%s/object_history" % app_label , 675 "admin/object_history"], extra_context, context_instance=Context(request)) 670 676 history = staff_member_required(history)