summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2005-07-23 15:49:26 +0000
committerAdrian Holovaty <adrian@holovaty.com>2005-07-23 15:49:26 +0000
commit768c17eda0310b99daa75e05e7e1e00bb82fbc15 (patch)
tree82f8b20ed7ba17f22afe7f8aa8ad8fa1e8f86110
parent4ab1e196c44903f89d123a6055d3330100bfbc1c (diff)
Fixed #168 -- admin object history was assuming primary key was named 'id'. Thanks, clintecker@gmail.com
git-svn-id: http://code.djangoproject.com/svn/django/trunk@302 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 5c9ed69dd3..35654e4872 100644
--- a/django/views/admin/main.py
+++ b/django/views/admin/main.py
@@ -1077,7 +1077,7 @@ def history(request, app_label, module_name, object_id):
order_by=("action_time",), select_related=True)
# If no history was found, see whether this object even exists.
try:
- obj = mod.get_object(id__exact=object_id)
+ obj = mod.get_object(**{'%s__exact' % opts.pk.name: object_id})
except ObjectDoesNotExist:
raise Http404
t = template_loader.get_template('admin_object_history')