django/django — pull request #581 by BHold (2012-12-12 16:13:22+00:00)
Title: Fixed #19432 -- Better error messages for get_object_or_404

Get_object_or_404 and get_list_or_404 now give a more helpful ValueError message if a user tries to give them an argument object that is not a Model, Manager, or QuerySet. Passes all tests.