Ticket #2048: positional-args-in-get-object-or-404.diff

File positional-args-in-get-object-or-404.diff, 626 bytes (added by Joeboy, 18 years ago)
  • django/shortcuts/__init__.py

     
    1010    return HttpResponse(loader.render_to_string(*args, **kwargs))
    1111load_and_render = render_to_response # For backwards compatibility.
    1212
    13 def get_object_or_404(klass, **kwargs):
     13def get_object_or_404(klass, *args, **kwargs):
    1414    try:
    15         return klass._default_manager.get(**kwargs)
     15        return klass._default_manager.get(*args, **kwargs)
    1616    except klass.DoesNotExist:
    1717        raise Http404
    1818
Back to Top