bodger
bodger

Reputation: 1182

Change email address when it is username field

I'm using django-allauth for my user management and using the user's email address as the username field.

Everything is working fine and I've got a form the user can use to update their details - first name, last name etc. - which works perfectly.

But it won't update the user's email address using that form. I'm guessing it's because it's the primary key but how would I go about allowing the user to change their email address in this scenario?

Upvotes: 1

Views: 211

Answers (1)

pad
pad

Reputation: 2396

You can use EmailAddress.change in your view.

Upvotes: 1

Related Questions