Update User Profiles - Django Wednesdays Twitter #11

  Рет қаралды 6,691

Codemy.com

Codemy.com

Күн бұрын

Пікірлер
@Codemycom
@Codemycom Жыл бұрын
▶ Watch Django Wednesdays Twitter Playlist ✅ Subscribe To My KZbin Channel: bit.ly/3BA5c6i bit.ly/2IGzvOR ▶ See More At: ✅ Join My Facebook Group: Codemy.com bit.ly/2GFmOBz ▶ Learn to Code at Codemy.com ✅ Buy a Codemy T-Shirt! Take 50% off with coupon code: youtube50 bit.ly/2VC9WUN ▶ Get The Code bit.ly/3PrSIDy
@ArSiddharth
@ArSiddharth Жыл бұрын
Thank you 😊
@Codemycom
@Codemycom Жыл бұрын
@@ArSiddharth welcome
@labialkosta261
@labialkosta261 Жыл бұрын
Thanks for uploading; you deserve a lot of support.
@Codemycom
@Codemycom Жыл бұрын
Thanks! Tell your friends ;-)
@Tomytoka
@Tomytoka Жыл бұрын
so aparently in django version higher than 4.1.4 you get a "A user with that username already exists" message and it needs to change the username if anyone knows why please tell me
@emreylmaz8758
@emreylmaz8758 10 ай бұрын
I also had the same issue for the past two days. I did not figure it out yet. Are there anyone who can help about the issue and solution
@lorenminiuk2435
@lorenminiuk2435 Жыл бұрын
Hi John, very effective coding 👌, thanxs a lot
@Codemycom
@Codemycom Жыл бұрын
Thanks!
@CodeRytr
@CodeRytr Жыл бұрын
11: 17 A user with that username already exists. In the form of update user page method is post action is django url way to update user and enctype is multipart form data
@Codemycom
@Codemycom Жыл бұрын
I keep answering you when you keep asking this same question. What did you do differently from the video? Check your code to discover what you did differently.
@0549257524
@0549257524 Жыл бұрын
hey, im actually having the same issue. and after comparing my SignUpForm and update_user function i found no code differences, please update if you figure this out :)
@CodeRytr
@CodeRytr Жыл бұрын
@@0549257524 Django version ?
@0549257524
@0549257524 Жыл бұрын
@@CodeRytr 4.2
@CodeRytr
@CodeRytr Жыл бұрын
@@0549257524 Change it Django==4.1.4 It works for me.. 👍
@MagicByIzzy
@MagicByIzzy Жыл бұрын
Hi John, thanks so much for this playlist, it's really helpful! However I have a bug. I have the same code as you, but when I try to update a profile, it says "An account with this username already exists"
@Codemycom
@Codemycom Жыл бұрын
Then you don't have the same code as me. Set it aside for a few days and then compare it to the video again and the error will jump right out at you.
@MagicByIzzy
@MagicByIzzy Жыл бұрын
@@Codemycom okay, will try that
@modelrailwaymaster
@modelrailwaymaster Жыл бұрын
did you find the error because im getting the same error @@MagicByIzzy
@user-gq1ij
@user-gq1ij Жыл бұрын
Same with me, did you find how ?
@lorenminiuk2435
@lorenminiuk2435 Жыл бұрын
Hi When I try to update the profile I get this weird message: "A user with that username already exists." Of course the profile exists because this is an update. It seems that the core system is taken hand on my code. I tried to have a look on your Git but unfortunately the update profile function is not in. Would you have an idea ? How is it possible that UserCreationForm is used for both Creation and Update ?
@Codemycom
@Codemycom Жыл бұрын
yeah, it's a problem with the new version of django. Break the pages into two...one with User Auth stuff, and one with profile stuff.
@lorenminiuk2435
@lorenminiuk2435 Жыл бұрын
👌@@Codemycom
@manualdagringa6575
@manualdagringa6575 11 ай бұрын
yeah i'm getting the same error as everyone, i suspect django expects us to change the username but my user won't necessarily want to change his/her username so we need to find a way to get around this, using django's old versions might help but it's not a long term solution
@Codemycom
@Codemycom 11 ай бұрын
Switch to a UserChangeForm instead of UserCreationForm
@mohammadamini-hi3ps
@mohammadamini-hi3ps 9 ай бұрын
I know , in form change usercertain form to 'BaseuserCreatinForm'
@ishhh8399
@ishhh8399 8 ай бұрын
after doing the update page instance when im trying to update the name it says the user with this username exists i dont understand what i did wrong
@Codemycom
@Codemycom 8 ай бұрын
Try putting it away for a few days and then coming back with fresh eyes and comparing your code to the video...the error will likely pop right out to you then.
@ishhh8399
@ishhh8399 8 ай бұрын
@@Codemycom i definitely will come back to it on a later date, thanks for the content and active replying to comments it really upgrades the experience of watching your courses. P.S you made me not hate coding
@ishhh8399
@ishhh8399 8 ай бұрын
@Codemycom i tried it again and it still says "the user with this username already exists" when i try to update any information on the form. ive checked it twice please help
@Codemycom
@Codemycom 8 ай бұрын
@@ishhh8399 I can't really guess what you did wrong...but there's something in your code different from the videos.
@CodeRytr
@CodeRytr Жыл бұрын
11:17 Showing error A user with that username already exists.
@Codemycom
@Codemycom Жыл бұрын
What did you do differently from the video? Check your code to discover what you did differently.
@dmitryvolkov5167
@dmitryvolkov5167 Жыл бұрын
I have the same error
@user-gq1ij
@user-gq1ij Жыл бұрын
Any update on why this is happening
@briangreenberg153
@briangreenberg153 Жыл бұрын
John, it's your buddy, Brian, here in lovely Las Vegas. I'm running Django 4.2.5 as it's already October 2023. Seems that I am getting the same error several folks have already pointed out with exactly same code as in your video: "An account with this username already exists." Do you know of a workaround we could use? I suspect your code works fine with an earlier Django version. Thanks
@Codemycom
@Codemycom Жыл бұрын
You can always pip uninstall django and install the version I use: pip install Django==4.1.4
@briangreenberg153
@briangreenberg153 Жыл бұрын
@@Codemycom I thought I would try something else first. So, I created a new form for updating user info. It is the same as the SignUpForm, but without the password fields. Seems to work ok with Django 4.2.5. Additionally, in the view, I commented out the login(request.current_user) after saving the form because it did not log me out! Probably because no password entry was involved. So far, so good. Not sure if this will come back to bite me later on!
@larsbenjaminagerbo3501
@larsbenjaminagerbo3501 Жыл бұрын
I've checked my code several times now and it's exactly as in the video, but when I try to update, I too get the error "A user with that username already exists"
@larsbenjaminagerbo3501
@larsbenjaminagerbo3501 Жыл бұрын
Just tried copying my code to an instance running django 4.1.4 and I do not get the error, so it seems to be django-related
@ryanb55
@ryanb55 Жыл бұрын
@@larsbenjaminagerbo3501 Same here!
@Codemycom
@Codemycom Жыл бұрын
Not necessarily, you're just using a new instance that doesn't already have a username that exists...
@larsbenjaminagerbo3501
@larsbenjaminagerbo3501 Жыл бұрын
@@Codemycom In both instances I made sure that my admin-user was the only user in the database and then I created a user and then changed the name and in 4.1.4 I got no error but in 4.2.3 I got the 'A user with that username already exists' error :)
@user-gq1ij
@user-gq1ij Жыл бұрын
Same error, did you find how
@musavirrehman3841
@musavirrehman3841 Жыл бұрын
Thanks for uploading the django series continuously I have a question how we will send generated pdf to hard-coded email in django?
@Codemycom
@Codemycom Жыл бұрын
I don't have any videos on that. You generally want to use a third party like mailgun etc to send mail in django.
@shaikhrahil6143
@shaikhrahil6143 Жыл бұрын
Thanks alot
@Codemycom
@Codemycom Жыл бұрын
Welcome!
@ArSiddharth
@ArSiddharth Жыл бұрын
💕 💕💕
@Codemycom
@Codemycom Жыл бұрын
:-)
Profile Pictures - Django Wednesdays Twitter #12
14:06
Codemy.com
Рет қаралды 5 М.
Support each other🤝
00:31
ISSEI / いっせい
Рет қаралды 81 МЛН
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН
Docker Compose Tutorial
33:02
Programming with Mosh
Рет қаралды 468 М.
Login With User Authentication - Django Wednesdays #21
21:25
Codemy.com
Рет қаралды 185 М.
Django Tutorial - User Registration with Email Confirmation #15
21:28
Python Lessons
Рет қаралды 43 М.
Profile Page With Followers - Django Wednesdays Twitter #5
16:03
Extend Your Django User Framework With a One To One Field
11:39
Pretty Printed
Рет қаралды 42 М.
Adding a session timeout in Django
15:44
Cloud With Django
Рет қаралды 10 М.
How To Register Users - Django Wednesdays #24
14:53
Codemy.com
Рет қаралды 45 М.
Upload Profile Pic Form - Django Wednesdays Twitter #13
11:49
Codemy.com
Рет қаралды 6 М.
Follow and Unfollow Buttons - Django Wednesdays Twitter #6
12:28
Support each other🤝
00:31
ISSEI / いっせい
Рет қаралды 81 МЛН