GeriLife / companionship

Promoting companionship and well-being for everyone.
European Union Public License 1.2
7 stars 18 forks source link

Accounts - class based user profile update view #53

Closed anykate closed 2 years ago

anykate commented 2 years ago

Hello Geri,

I have come up with class based update profile view in your "accounts" app - kindly have a look.

Thanks, A

brylie commented 2 years ago

@anykate, thank you so much for your contribution! I was struggling to figure this one out :sweat_smile:

I'll take a closer look at the code ASAP, since I'm getting ready for bed currently.

Edit: I made some some comments related to code lint, but overall this PR looks great! I'll test the code tomorrow.

brylie commented 2 years ago

When I try to update my profile, I get a validation error on the email field:

image

brylie commented 2 years ago

Thanks @anykate, for this contribution :-)

It turns out that we were really close with your original approach. I just modified it slightly to use UpdateView and pass in the initial request.user to the form instance. Great collaboration!

brylie commented 2 years ago

@all-contributors please add @anykate for code

allcontributors[bot] commented 2 years ago

@brylie

I've put up a pull request to add @anykate! :tada: