diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2005-08-10 18:46:11 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2005-08-10 18:46:11 +0000 |
| commit | b3ae12fa4ac3192b732be76f26ff707b60639bd1 (patch) | |
| tree | c7c6e38aa6ea9e22b0bcbf9016af2dcf16758ec4 | |
| parent | 8e2d2753903dd0c9e2c5dd5b8fc61e0c613161a5 (diff) | |
Cleaned up admin view code to use new 'pk' lookup syntax
git-svn-id: http://code.djangoproject.com/svn/django/trunk@468 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/views/admin/main.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/views/admin/main.py b/django/views/admin/main.py index 5a2732d152..210523a8bb 100644 --- a/django/views/admin/main.py +++ b/django/views/admin/main.py @@ -1048,7 +1048,7 @@ def delete_stage(request, app_label, module_name, object_id): if not request.user.has_perm(app_label + '.' + opts.get_delete_permission()): raise PermissionDenied try: - obj = mod.get_object(**{'%s__exact' % opts.pk.name: object_id}) + obj = mod.get_object(pk=object_id) except ObjectDoesNotExist: raise Http404 @@ -1082,7 +1082,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(**{'%s__exact' % opts.pk.name: object_id}) + obj = mod.get_object(pk=object_id) except ObjectDoesNotExist: raise Http404 t = template_loader.get_template('admin_object_history') |
