﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
19432	Using get_object_or_404 on a class that isn't a Django model could result in a more obvious error message.	Kit Sunde	BHold	"I have a Calendar model in my app but I wrongly imported calendar.Calendar from python instead which resulted in:

type object 'Calendar' has no attribute '_default_manager'

Which led me to think it was this issue: https://code.djangoproject.com/ticket/10405 perhaps it would be possible to raise a ValueError if get_object_or_404 receives something that is not of the correct type with ""type object 'Calendar' is not a Django Model"".

In _get_queryset it seems like it should raise a ValueErorr if it is not a Model, Manager, or QuerySet if that is what it expects, rather than to assume it is a Model if it's not the other two as it is now.

Or perhaps it was just PEBCAK on my part. :)"	Cleanup/optimization	closed	Core (Other)	1.4	Normal	fixed		BHold	Accepted	1	0	0	0	1	0
