▶ 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 Жыл бұрын
Thank you 😊
@Codemycom Жыл бұрын
@@ArSiddharth welcome
@labialkosta261 Жыл бұрын
Thanks for uploading; you deserve a lot of support.
@Codemycom Жыл бұрын
Thanks! Tell your friends ;-)
@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
@emreylmaz875810 ай бұрын
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 Жыл бұрын
Hi John, very effective coding 👌, thanxs a lot
@Codemycom Жыл бұрын
Thanks!
@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 Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
@@0549257524 Django version ?
@0549257524 Жыл бұрын
@@CodeRytr 4.2
@CodeRytr Жыл бұрын
@@0549257524 Change it Django==4.1.4 It works for me.. 👍
@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 Жыл бұрын
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 Жыл бұрын
@@Codemycom okay, will try that
@modelrailwaymaster Жыл бұрын
did you find the error because im getting the same error @@MagicByIzzy
@user-gq1ij Жыл бұрын
Same with me, did you find how ?
@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 Жыл бұрын
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 Жыл бұрын
👌@@Codemycom
@manualdagringa657511 ай бұрын
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
@Codemycom11 ай бұрын
Switch to a UserChangeForm instead of UserCreationForm
@mohammadamini-hi3ps9 ай бұрын
I know , in form change usercertain form to 'BaseuserCreatinForm'
@ishhh83998 ай бұрын
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
@Codemycom8 ай бұрын
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.
@ishhh83998 ай бұрын
@@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
@ishhh83998 ай бұрын
@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
@Codemycom8 ай бұрын
@@ishhh8399 I can't really guess what you did wrong...but there's something in your code different from the videos.
@CodeRytr Жыл бұрын
11:17 Showing error A user with that username already exists.
@Codemycom Жыл бұрын
What did you do differently from the video? Check your code to discover what you did differently.
@dmitryvolkov5167 Жыл бұрын
I have the same error
@user-gq1ij Жыл бұрын
Any update on why this is happening
@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 Жыл бұрын
You can always pip uninstall django and install the version I use: pip install Django==4.1.4
@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 Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
@@larsbenjaminagerbo3501 Same here!
@Codemycom Жыл бұрын
Not necessarily, you're just using a new instance that doesn't already have a username that exists...
@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 Жыл бұрын
Same error, did you find how
@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 Жыл бұрын
I don't have any videos on that. You generally want to use a third party like mailgun etc to send mail in django.