﻿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
29753	User Admin models use `django.contrib.auth.models.User` instead of `User = get_user_model()`	Ariel Pontes	nobody	"I have a custom User model that is exactly the same as Django's default User model except for the fact that we allow longer usernames (I'm on Django 1.9, which has a 30 character limit on usernames). Because this is the only difference, I use all default User models in the Admin. However, when I try to create a user with a long username, I get the 30 character limit error. In the shell everything works fine. When investigating I saw that in the `django/contrib/auth/forms.py` file, the `UserCreationForm` referred to `django.contrib.auth.models.User`. I believe it should refer instead to `UserModel` (which is declared in the file using `get_user_model()`).

Relevant lines:

* https://github.com/django/django/blob/stable/2.1.x/django/contrib/auth/forms.py#L86
* https://github.com/django/django/blob/stable/2.1.x/django/contrib/auth/forms.py#L135"	Bug	closed	contrib.admin	2.1	Normal	duplicate			Unreviewed	0	0	0	0	0	0
