Blarghh!  Ok, I'm serious that I spent considerable time Googling, poring 
over the contrib.auth and core files and otherwise staring at my screen to 
try to fix this on my own before posting.  But of course I figure it out 
two minutes after I wasted the time of anyone who actually read this post.

The problem was that I had
USERNAME_FIELD = 'username'
REQUIRED_FIELDS = ['username','email','first_name'...]
in my user class.  Once I removed 'username' from the REQUIRED_FIELDS, it 
worked like a charm.

Lesson learned: Read the docs more carefully
"REQUIRED_FIELDS must contain all required fields on your User model, but 
should *not* contain theUSERNAME_FIELD."

On Thursday, October 18, 2012 3:38:05 PM UTC-4, Chris Pagnutti wrote:
>
> Hi.  I'm just trying out the new way to create a custom User class by 
> extending the AbstractBaseUser class.  I essentially just copied the 
> AbstractUser and UserManager classes from auth.models and customized the 
> fields the way I want 'em.  I also set AUTH_USER_MODEL in settings 
> appropriately.
>
> But when I do syncdb, the tables get created fine, but when I try to 
> create a superuser, it asks for the username twice, then throws this error
>
> TypeError: create_superuser() got multiple values for keyword argument 
> 'username'
>
> Anyone know what's going on?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/nv92Gk4OMr8J.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to