summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2005-07-26 22:43:27 +0000
committerAdrian Holovaty <adrian@holovaty.com>2005-07-26 22:43:27 +0000
commit3c0c0e7317ebc5bb43faf8cdf24ca495ff154e91 (patch)
tree376a22c00c7d383f0659c69f67ffaab3d32f3636
parentb23c63bcfeb870c46889fbf1d36874017c358c90 (diff)
Fixed #162 -- Admin log now records repr() before calling delete(), instead of after calling it() -- thanks, mfenniak@pobox.com!
git-svn-id: http://code.djangoproject.com/svn/django/trunk@324 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/views/admin/main.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/views/admin/main.py b/django/views/admin/main.py
index 35654e4872..dbefc1c569 100644
--- a/django/views/admin/main.py
+++ b/django/views/admin/main.py
@@ -1056,8 +1056,8 @@ def delete_stage(request, app_label, module_name, object_id):
if request.POST: # The user has already confirmed the deletion.
if perms_needed:
raise PermissionDenied
- obj.delete()
obj_repr = repr(obj)
+ obj.delete()
log.log_action(request.user.id, opts.get_content_type_id(), object_id, obj_repr, log.DELETION)
request.user.add_message('The %s "%s" was deleted successfully.' % (opts.verbose_name, obj_repr))
return HttpResponseRedirect("../../")