Index: django/shortcuts/__init__.py
===================================================================
--- django/shortcuts/__init__.py	(revision 5320)
+++ django/shortcuts/__init__.py	(working copy)
@@ -5,28 +5,36 @@
 from django.template import loader
 from django.http import HttpResponse, Http404
 from django.db.models.manager import Manager
+from django.db.models.query import QuerySet
 
 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_queryset(klass):
+    '''
+    Returns a queryset from a Model, Manager or Queryset. Created to make
+    get_object_or_404 and get_list_or_404 more DRY.
+    '''
+    if isinstance(klass, QuerySet):
+        return klass
+    else:
+        if isinstance(klass, Manager):
+            manager = klass
+        else:
+            manager = klass._default_manager
+        return manager.all()
+
 def get_object_or_404(klass, *args, **kwargs):
-    if isinstance(klass, Manager):
-        manager = klass
-        klass = manager.model
-    else:
-        manager = klass._default_manager
+    queryset = _get_queryset(klass)
     try:
-        return manager.get(*args, **kwargs)
-    except klass.DoesNotExist:
-        raise Http404('No %s matches the given query.' % klass._meta.object_name)
+        return queryset.get(*args, **kwargs)
+    except queryset.model.DoesNotExist:
+        raise Http404('No %s matches the given query.' % queryset.model._meta.object_name)
 
 def get_list_or_404(klass, *args, **kwargs):
-    if isinstance(klass, Manager):
-        manager = klass
-    else:
-        manager = klass._default_manager
-    obj_list = list(manager.filter(*args, **kwargs))
+    queryset = _get_queryset(klass)
+    obj_list = list(queryset.filter(*args, **kwargs))
     if not obj_list:
-        raise Http404('No %s matches the given query.' % manager.model._meta.object_name)
+        raise Http404('No %s matches the given query.' % queryset.model._meta.object_name)
     return obj_list
Index: tests/modeltests/get_object_or_404/models.py
===================================================================
--- tests/modeltests/get_object_or_404/models.py	(revision 5320)
+++ tests/modeltests/get_object_or_404/models.py	(working copy)
@@ -69,6 +69,10 @@
 >>> get_object_or_404(Article.by_a_sir, title="Run away!")
 <Article: Run away!>
 
+# QuerySets can be used too
+>>> get_object_or_404(Article.objects.all(), title__contains="Run")
+<Article: Run away!>
+
 # get_list_or_404 can be used to get lists of objects
 >>> get_list_or_404(a.article_set, title__icontains='Run')
 [<Article: Run away!>]
@@ -83,4 +87,8 @@
 >>> get_list_or_404(Article.by_a_sir, title__icontains="Run")
 [<Article: Run away!>]
 
+# QuerySets can be used too
+>>> get_list_or_404(Article.objects.all(), title__icontains="Run")
+[<Article: Run away!>]
+
 """}
Index: docs/db-api.txt
===================================================================
--- docs/db-api.txt	(revision 5320)
+++ docs/db-api.txt	(working copy)
@@ -1766,7 +1766,7 @@
 When you provide a model to this shortcut function, the default manager
 is used to execute the underlying ``get()`` query. If you don't want to
 use the default manager, or if you want to search a list of related objects,
-you can provide ``get_object_or_404()`` with a manager object instead.
+you can provide ``get_object_or_404()`` with a manager object or queryset instead.
 For example::
 
     # Get the author of blog instance `e` with a name of 'Fred'
@@ -1775,6 +1775,11 @@
     # Use a custom manager 'recent_entries' in the search for an
     # entry with a primary key of 3
     e = get_object_or_404(Entry.recent_entries, pk=3)
+    
+    # Use a QuerySet from a custom 'published' method in a 
+    # customized manager in the search for an entry with
+    # primary key of 5
+    e = get_object_or_404(Entry.objects.published(), pk=5)
 
 get_list_or_404()
 -----------------
