Browse files

newforms-admin: Fixed #6819 -- When the user does not have change per…


avoid redirecting to the changelist view after deleting an object. Thanks rmyers!

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 65ef8d4 commit 7b2ae6e624d2c4a16e9e262f08225371891a738d @brosner brosner committed Jun 7, 2008
Showing with 2 additions and 0 deletions.
  1. +2 −0 django/contrib/admin/
2 django/contrib/admin/
@@ -646,6 +646,8 @@ def delete_view(self, request, object_id):
LogEntry.objects.log_action(, ContentType.objects.get_for_model(self.model).id, object_id, obj_display, DELETION)
request.user.message_set.create(message=_('The %(name)s "%(obj)s" was deleted successfully.') % {'name': force_unicode(opts.verbose_name), 'obj': force_unicode(obj_display)})
+ if not self.has_change_permission(request, None):
+ return HttpResponseRedirect("../../../../")
return HttpResponseRedirect("../../")
extra_context = {
"title": _("Are you sure?"),

0 comments on commit 7b2ae6e

Please sign in to comment.