Skip to content
Browse files

Fixed #2048 - get_object_or_404 now allows *args as well. Thanks, Joeboy

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 6b1e7bd commit 4a57ef858870faaadfcbc30cd8af4520fe7c9d51 @jacobian jacobian committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/shortcuts/
4 django/shortcuts/
@@ -10,9 +10,9 @@ def render_to_response(*args, **kwargs):
return HttpResponse(loader.render_to_string(*args, **kwargs))
load_and_render = render_to_response # For backwards compatibility.
-def get_object_or_404(klass, **kwargs):
+def get_object_or_404(klass, *args, **kwargs):
- return klass._default_manager.get(**kwargs)
+ return klass._default_manager.get(*args, **kwargs)
except klass.DoesNotExist:
raise Http404

0 comments on commit 4a57ef8

Please sign in to comment.
Something went wrong with that request. Please try again.