﻿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
19067	createsuperuser fails when custom user model has no username	Ian Clelland	Ian Clelland	"There is a dependency in the createsuperuser management command on the existence of a field called 'username' in a user model.

Since #3011 was fixed, user models do not necessarily have that field. They are required to have a single identifying field, which is passed in as the first parameter to their create_superuser() method, but it is not necessarily named `username`.

As a result, if syncdb installs django.contrib.auth, and the user model does not have a 'username' field, then the creation of the initial superuser will fail.

I have a (one line) patch which fixes this, and will try to get tests written for it later today."	Bug	closed	Documentation	dev	Normal	fixed		django@… tom@…	Accepted	1	0	0	0	0	0
