On Fri, Oct 19, 2012 at 3:50 AM, Chris Pagnutti
<
chris.p...@gmail.com> wrote:
> 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."
However, you raise a valid point. This is an error case that we should
be able to validate. It's easy to check "if USERNAME_FIELD in
error message about duplicated data. I've raised ticket #19150 to
track this. Thanks for the report!