Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Don't assume USERNAME_FIELD == 'user' in UserAdmin. #427

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
Contributor

gavinwahl commented Oct 5, 2012

Never assume that a user object has a field named username, use
USERNAME_FIELD instead.

fixes https://code.djangoproject.com/ticket/19077

@gavinwahl gavinwahl Don't assume USERNAME_FIELD == 'user' in UserAdmin.
Never assume that a user object has a field named `username`, use
`USERNAME_FIELD` instead.

fixes #19077
af667c2
Member

ptone commented Oct 7, 2012

as clarified in https://code.djangoproject.com/ticket/19077#comment:6 - the default ModelAdmin will not easily work with custom user models that don't largely conform to auth.User, and the solution is likely to subclass UserAdmin

@ptone ptone closed this Oct 7, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment