﻿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
5921	Common parent class for User and AnonymousUser	jag@…	nobody	"Howdy!

While I know of and respect Django's deference to Pythonic duck-typing, it would be helpful for {{{isinstance(obj, klass)}}} to confirm whether an object is a user or not, regardless of authentication. However User inherits solely from models.Model and !AnonymousUser inherits from object -- they have no common lineage despite common interface.

This patch creates an abstract parent class for both User and !AnonymousUser so a check for {{{isinstance(obj, django.contrib.auth.models.UserClass)}}} returns True whether the user is authenticated or not.

It provides this functionality without any other modification to the external interface, so there are no side-effects or other impacts of this change. I've tested it against the Django test suite and it passes.

-jag
"		closed	Contrib apps	dev		wontfix			Design decision needed	1	0	0	0	0	0
