﻿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
24087	django.contrib.forms.UserCreationForm inheritence won't work	Matías Lang	nobody	"If I create a custom User model based on AbstractUser, i should also create a custom user creation form, inheriting from django.contrib.forms.UserCreationForm and defining the custom model I created in the Meta subclass. This won't work properly because UserCreationForm always use auth.User model when cleaning the username instead of the one defined in Meta.
This should be patched changing lines 101 and 102 of contrib/auth/forms.py, from this:
101             User._default_manager.get(username=username)                         
102         except User.DoesNotExist:                                                
To this
101             self.Meta.model._default_manager.get(username=username)              
102         except self.Meta.model.DoesNotExist:                                     
"	Bug	closed	contrib.auth	1.7	Normal	duplicate	forms,auth,users,custom		Unreviewed	1	0	0	0	0	0
