- Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile

Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile

In this Python Django Tutorial, we will be finishing our user profile page. The final page will allow users to update their information and also add a new profile picture. We will also learn how to resize this image when it is uploaded to save space on our web server. Let's get started...

The co...
In this Python Django Tutorial, we will be finishing our user profile page. The final page will allow users to update their information and also add a new profile picture. We will also learn how to resize this image when it is uploaded to save space on our web server. Let's get started...

The code for this series can be found at:
https://github.com/CoreyMSchafer/code_snippets/tree/master/Django_Blog


✅ Support My Channel Through Patreon:
https://www.patreon.com/coreyms

✅ Become a Channel Member:
https://www.youtube.com/channel/UCCezIgC97PvUuR4_gbFUs5g/join

✅ One-Time Contribution Through PayPal:
https://goo.gl/649HFY

✅ Cryptocurrency Donations:
Bitcoin Wallet - 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3
Ethereum Wallet - 0x151649418616068fB46C3598083817101d3bCD33
Litecoin Wallet - MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot

✅ Corey's Public Amazon Wishlist
http://a.co/inIyro1

✅ Equipment I Use and Books I Recommend:
https://www.amazon.com/shop/coreyschafer

▶️ You Can Find Me On:
My Website - http://coreyms.com/
My Second Channel - https://www.youtube.com/c/coreymschafer
Facebook - https://www.facebook.com/CoreyMSchafer
Twitter -
Instagram - https://www.instagram.com/coreymschafer/

#Python #Django

#python #django #django 2 #django 2.0 #django 2.1 #django version 2 #python django 2 #django tutorial #python django tutorial #django update #django update user #django update profile #django update form #corey schafer #django tutorial for beginners #python programming
- form to update profile - Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile

- form to update profile

Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile
2018年09月01日 
00:00:25 - 00:03:28
I am wondering why in  , the UserUpdateForm also need "email=forms.EmailField()"? I know we needed that in UserRegisterForm because UserCreationForm doesn't have email field. But seems to me ,the UserUpdateForm is with User Model not with UserCreationForm, right? - Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile

I am wondering why in , the UserUpdateForm also need "email=forms.EmailField()"? I know we needed that in UserRegisterForm because UserCreationForm doesn't have email field. But seems to me ,the UserUpdateForm is with User Model not with UserCreationForm, right?

Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile
2018年09月01日 
00:02:13 - 00:26:07
Question for around -4:00 minute mark:Why does UserRegisterForm and the UserUpdateForm have the attribute "email", but not "Username"?My understanding is that you only need to define the attributes that do not currently exist in the User Model; however, it looks like both Email and Username are already defined in the model.So why do we need the email attribute at all? - Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile

Question for around -4:00 minute mark:Why does UserRegisterForm and the UserUpdateForm have the attribute "email", but not "Username"?My understanding is that you only need to define the attributes that do not currently exist in the User Model; however, it looks like both Email and Username are already defined in the model.So why do we need the email attribute at all?

Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile
2018年09月01日 
00:03:00 - 00:26:07
- view to update profile - Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile

- view to update profile

Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile
2018年09月01日 
00:03:28 - 00:04:54
around minute  your speed was like looool jajajaj I had to pause the video like 5 times :D - Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile

around minute your speed was like looool jajajaj I had to pause the video like 5 times :D

Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile
2018年09月01日 
00:04:40 - 00:26:07
- template - Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile

- template

Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile
2018年09月01日 
00:04:54 - 00:07:13
That enctype at  screwed me up real good for 4 days trying to debug the program. I'm glad Corey pointed it out. Thanks Corey. - Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile

That enctype at screwed me up real good for 4 days trying to debug the program. I'm glad Corey pointed it out. Thanks Corey.

Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile
2018年09月01日 
00:06:45 - 00:26:07
-  enctype attribute - Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile

- enctype attribute

Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile
2018年09月01日 
00:07:13 - 00:09:20
DON'T FORGET  FOLKS! Took me 1 week to fix an issue that wasn't even visible 😫 - Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile

DON'T FORGET FOLKS! Took me 1 week to fix an issue that wasn't even visible 😫

Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile
2018年09月01日 
00:07:33 - 00:26:07
This series is incredible, thank you Corey :) I think the enctype thing at  needs a special emphasis. I spent 30 minutes trying to figure out why the username and email updated fine, but the image wouldn't. Putting this here to hopefully save someone the headache. - Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile

This series is incredible, thank you Corey :) I think the enctype thing at needs a special emphasis. I spent 30 minutes trying to figure out why the username and email updated fine, but the image wouldn't. Putting this here to hopefully save someone the headache.

Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile
2018年09月01日 
00:07:35 - 00:26:07
I followed up till  and then I checked up on my server it was fine too but when loaded the profile page from the site it showed an error and said "ModelForm has no model class specified.
" - Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile

I followed up till and then I checked up on my server it was fine too but when loaded the profile page from the site it showed an error and said "ModelForm has no model class specified. "

Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile
2018年09月01日 
00:08:30 - 00:26:07
At  when i load the profile page server throws below error. please helpValue Error: ModelForm has no model class specified - Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile

At when i load the profile page server throws below error. please helpValue Error: ModelForm has no model class specified

Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile
2018年09月01日 
00:08:40 - 00:26:07
Start from - Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile

Start from

Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile
2018年09月01日 
00:08:40 - 00:26:07
Yo at  Everything works fine except I don't get the upload image box. Anyone know what I did wrong? - Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile

Yo at Everything works fine except I don't get the upload image box. Anyone know what I did wrong?

Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile
2018年09月01日 
00:08:57 - 00:26:07
- model form - Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile

- model form

Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile
2018年09月01日 
00:09:20 - 00:11:11
what if I dont want to keep registration open to all and I want a logged in user to create an account, also i want to have an additional field in the profile as created_by and it will have the name of the user that created the profile - Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile

what if I dont want to keep registration open to all and I want a logged in user to create an account, also i want to have an additional field in the profile as created_by and it will have the name of the user that created the profile

Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile
2018年09月01日 
00:10:14 - 00:26:07
ModelForm 기존의 model의 이용하여 form 만들기https://docs.djangoproject.com/en/3.0/topics/forms/modelforms/#modelform - Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile

ModelForm 기존의 model의 이용하여 form 만들기https://docs.djangoproject.com/en/3.0/topics/forms/modelforms/#modelform

Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile
2018年09月01日 
00:10:25 - 00:11:30
Great tutorial, but i don't understand where profile is in request.user.profile at - Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile

Great tutorial, but i don't understand where profile is in request.user.profile at

Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile
2018年09月01日 
00:10:28 - 00:26:07
- pass in POST data - Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile

- pass in POST data

Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile
2018年09月01日 
00:11:11 - 00:16:41
HttpRequest.POST 안에 사용자가 입력한 form data가 들어있다.https://docs.djangoproject.com/en/3.0/ref/request-response/#django.http.HttpRequest.POST - Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile

HttpRequest.POST 안에 사용자가 입력한 form data가 들어있다.https://docs.djangoproject.com/en/3.0/ref/request-response/#django.http.HttpRequest.POST

Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile
2018年09月01日 
00:11:30 - 00:12:15
HttpRequest.FILES - Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile

HttpRequest.FILES

Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile
2018年09月01日 
00:12:15 - 00:12:50
multi form validation - Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile

multi form validation

Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile
2018年09月01日 
00:12:50 - 00:17:29
Hi Corey - I was wondering at  we have added both the u_form.save() and the p_form.save() - however, we have also added a signal that is supposed to save a profile each time the user is saved... so my question is - is it really necessary to also call save on the Profile form here? - Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile

Hi Corey - I was wondering at we have added both the u_form.save() and the p_form.save() - however, we have also added a signal that is supposed to save a profile each time the user is saved... so my question is - is it really necessary to also call save on the Profile form here?

Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile
2018年09月01日 
00:13:22 - 00:26:07
How to give Title to the Profile page? Earlier I used {'title': 'Profile'} as 3rd arg for return render. Now its conflicting with context dictionary. - Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile

How to give Title to the Profile page? Earlier I used {'title': 'Profile'} as 3rd arg for return render. Now its conflicting with context dictionary.

Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile
2018年09月01日 
00:14:49 - 00:26:07
I have a little problem. , I updated my profile like username and Email, it does not change. like CoreyMS --> CoreyMS2.. - Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile

I have a little problem. , I updated my profile like username and Email, it does not change. like CoreyMS --> CoreyMS2..

Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile
2018年09月01日 
00:15:20 - 00:26:07
At  the field for "image *" doesn't render like the one in the video please help(image attached via link).  https://imgur.com/z0uLlnM(Update 1) the problem is caused by -> {{ p_form|crispy }} how can i fix it to display like in the video ?(Update 2) I managed to find the solution, Just make sure in the "settings.py" file that CRISPY_TEMPLATE_PACK = 'bootstrap3', for some reason BS4 was causing the page to render incorrectly. The problem I have now is that the flash message doesn't appear after I update instead it appears in the "admin.html". - Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile

At the field for "image *" doesn't render like the one in the video please help(image attached via link). https://imgur.com/z0uLlnM(Update 1) the problem is caused by -> {{ p_form|crispy }} how can i fix it to display like in the video ?(Update 2) I managed to find the solution, Just make sure in the "settings.py" file that CRISPY_TEMPLATE_PACK = 'bootstrap3', for some reason BS4 was causing the page to render incorrectly. The problem I have now is that the flash message doesn't appear after I update instead it appears in the "admin.html".

Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile
2018年09月01日 
00:15:39 - 00:26:07
the dog is adorable. Instantly Paused the tutorial to mention this. - Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile

the dog is adorable. Instantly Paused the tutorial to mention this.

Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile
2018年09月01日 
00:16:30 - 00:26:07
It's impossible for me to display the images I upload. I see them in my project, they appear in the folder profile_pics, I see the requests when I modify a profile, everything looks OK but on any profile page, I don't have them. And when I try to see a picture like you do at @ by typing his URL, it redirects me to the home page and yet I still have this URL : localhost:8000/media/profile_pics/u2.jpg. - Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile

It's impossible for me to display the images I upload. I see them in my project, they appear in the folder profile_pics, I see the requests when I modify a profile, everything looks OK but on any profile page, I don't have them. And when I try to see a picture like you do at @ by typing his URL, it redirects me to the home page and yet I still have this URL : localhost:8000/media/profile_pics/u2.jpg.

Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile
2018年09月01日 
00:16:31 - 00:26:07
who is that good boi? - Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile

who is that good boi?

Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile
2018年09月01日 
00:16:33 - 00:26:07
The Highlight of my morning. Thank you - Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile

The Highlight of my morning. Thank you

Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile
2018年09月01日 
00:16:40 - 00:26:07
- auto resize image - Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile

- auto resize image

Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile
2018年09月01日 
00:16:41 - 00:23:27
resizing image with pillow - Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile

resizing image with pillow

Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile
2018年09月01日 
00:17:29 - 00:18:25
resize - Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile

resize

Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile
2018年09月01日 
00:17:35 - 00:26:07
Model.save()https://docs.djangoproject.com/en/3.0/ref/models/instances/#saving-objects - Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile

Model.save()https://docs.djangoproject.com/en/3.0/ref/models/instances/#saving-objects

Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile
2018年09月01日 
00:18:25 - 00:24:50
imo you should pass *args **kwargs to both `save` methods. Also, I'm not sure Image closes automatically. I'd use `with open` on that `self.image.path`. - Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile

imo you should pass *args **kwargs to both `save` methods. Also, I'm not sure Image closes automatically. I'd use `with open` on that `self.image.path`.

Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile
2018年09月01日 
00:19:35 - 00:26:07
Image Resize - Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile

Image Resize

Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile
2018年09月01日 
00:21:41 - 00:26:07
In the previous videos, we ran migrations after making changes to models.py file. Here @,  how is it still working fine without running migrations? - Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile

In the previous videos, we ran migrations after making changes to models.py file. Here @, how is it still working fine without running migrations?

Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile
2018年09月01日 
00:22:10 - 00:26:07
- display author image in post - Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile

- display author image in post

Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile
2018年09月01日 
00:23:27 - 00:26:07
bootstrap rounded-circle article-img - Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile

bootstrap rounded-circle article-img

Python Django Tutorial: Full-Featured Web App Part 9 - Update User Profile
2018年09月01日 
00:24:50 - 00:26:07

Corey Schafer

※本サイトに掲載されているチャンネル情報や動画情報はYouTube公式のAPIを使って取得・表示しています。

Timetable

動画タイムテーブル

動画数:236件

how to override existing environment variables. (This is new to me) - Python Tutorial: Securely Manage Passwords and API Keys with DotEnv

how to override existing environment variables. (This is new to me)

Python Tutorial: Securely Manage Passwords and API Keys with DotEnv
2024年04月18日  @JorgeEscobarMX 様 
00:10:42 - 00:16:58
the future spoken is my current present. Unless I'm completely desperate, I'm not hitting reddit or google/stack overflow for most roadblocks. - How to Use ChatGPT as a Powerful Tool for Programming

the future spoken is my current present. Unless I'm completely desperate, I'm not hitting reddit or google/stack overflow for most roadblocks.

How to Use ChatGPT as a Powerful Tool for Programming
2023年05月22日  o k t o b e r 様 
00:12:22 - 00:31:08
Good video as always😉  I remember asking that too lol - How to Use ChatGPT as a Powerful Tool for Programming

Good video as always😉 I remember asking that too lol

How to Use ChatGPT as a Powerful Tool for Programming
2023年05月22日  kami 様 
00:28:19 - 00:31:08
@ - pure gold, pure gold! <3 - How to Use ChatGPT as a Powerful Tool for Programming

@ - pure gold, pure gold! <3

How to Use ChatGPT as a Powerful Tool for Programming
2023年05月22日  ulf gjerdingen 様 
00:28:26 - 00:31:08
You almost had me there haha! ChatGPT can be wrong but it certainly wasn't wrong about those top notch resources! I massively appreciate all the uploads and I hope they keep coming supercharged with Chat GPT. Thanks to you, sentdex, techwithtim and Dennis Ivy I now know how to properly code on python, use git for version control and build a functional website. - How to Use ChatGPT as a Powerful Tool for Programming

You almost had me there haha! ChatGPT can be wrong but it certainly wasn't wrong about those top notch resources! I massively appreciate all the uploads and I hope they keep coming supercharged with Chat GPT. Thanks to you, sentdex, techwithtim and Dennis Ivy I now know how to properly code on python, use git for version control and build a functional website.

How to Use ChatGPT as a Powerful Tool for Programming
2023年05月22日  Uj Vag 様 
00:28:42 - 00:31:08
and it's  am here (south east asia), and idk why I'm watching a python tutorial rather than sleeping 😂 - Python Tutorial: Simulate the Powerball Lottery Using Python

and it's am here (south east asia), and idk why I'm watching a python tutorial rather than sleeping 😂

Python Tutorial: Simulate the Powerball Lottery Using Python
2023年01月10日  X 様 
00:02:49 - 00:38:56
… nice… 😂 - Python Tutorial: Simulate the Powerball Lottery Using Python

… nice… 😂

Python Tutorial: Simulate the Powerball Lottery Using Python
2023年01月10日  Bartosz Turkowyd 様 
00:04:50 - 00:38:56
I've seen every Python video you've made....   first innuendo. 😜 - Python Tutorial: Simulate the Powerball Lottery Using Python

I've seen every Python video you've made.... first innuendo. 😜

Python Tutorial: Simulate the Powerball Lottery Using Python
2023年01月10日  Martin Beaudry 様 
00:04:52 - 00:38:56
Man it's  am in India I am lucky to be the first one to hear your voice god bless you brother and an awesome teacher. - Python Tutorial: Simulate the Powerball Lottery Using Python

Man it's am in India I am lucky to be the first one to hear your voice god bless you brother and an awesome teacher.

Python Tutorial: Simulate the Powerball Lottery Using Python
2023年01月10日  Big Samosa 様 
00:12:15 - 00:38:56
# you can also use the built-in pprint module for pretty printing dictionaries ;) - Python Tutorial: Simulate the Powerball Lottery Using Python

# you can also use the built-in pprint module for pretty printing dictionaries ;)

Python Tutorial: Simulate the Powerball Lottery Using Python
2023年01月10日  Schoenling Wunderbar 様 
00:25:00 - 00:38:56
it would be very interesting to see if there could be a step function where this algorithm can simulate the increases in jackpot winnings. It’s going to be one in 292+ million of a chance that you hit it at all much less multiple times, but the code should be interesting to see. - Python Tutorial: Simulate the Powerball Lottery Using Python

it would be very interesting to see if there could be a step function where this algorithm can simulate the increases in jackpot winnings. It’s going to be one in 292+ million of a chance that you hit it at all much less multiple times, but the code should be interesting to see.

Python Tutorial: Simulate the Powerball Lottery Using Python
2023年01月10日  20 80 様 
00:27:43 - 00:38:56
A OAuth Django video would be awesome!(Applicable to all sorts of OAuth situations, not just the YouTube API.) - Python YouTube API Tutorial: Using OAuth to Access User Accounts

A OAuth Django video would be awesome!(Applicable to all sorts of OAuth situations, not just the YouTube API.)

Python YouTube API Tutorial: Using OAuth to Access User Accounts
2020年09月10日 
00:07:58 - 00:43:21
At  you move the file and see some blurred miniature version of your open folders in the dock. How did you enable that? - Python YouTube API Tutorial: Using OAuth to Access User Accounts

At you move the file and see some blurred miniature version of your open folders in the dock. How did you enable that?

Python YouTube API Tutorial: Using OAuth to Access User Accounts
2020年09月10日 
00:09:58 - 00:43:21
In case you are getting Error 403 ("access_denied The developer hasn’t given you access to this app") go to the OAuth consent screen and under Test Users add your email by clicking on Add Users.  You should be able to grant access after you've added User. - Python YouTube API Tutorial: Using OAuth to Access User Accounts

In case you are getting Error 403 ("access_denied The developer hasn’t given you access to this app") go to the OAuth consent screen and under Test Users add your email by clicking on Add Users. You should be able to grant access after you've added User.

Python YouTube API Tutorial: Using OAuth to Access User Accounts
2020年09月10日 
00:19:36 - 00:43:21
@corey  So why did you add the join function here, when appending the video id to the list its already a list and its working for me when I pass the vid_ids directly - Python YouTube API Tutorial: Calculating the Duration of a Playlist

@corey So why did you add the join function here, when appending the video id to the list its already a list and its working for me when I pass the vid_ids directly

Python YouTube API Tutorial: Calculating the Duration of a Playlist
2020年06月11日 
00:11:24 - 00:37:38
TypeError: expected string or bytes-like object, I am taking this error in , any idea? - Python YouTube API Tutorial: Calculating the Duration of a Playlist

TypeError: expected string or bytes-like object, I am taking this error in , any idea?

Python YouTube API Tutorial: Calculating the Duration of a Playlist
2020年06月11日 
00:18:50 - 00:37:38
(I love that "Whoops that went too well"-moment at  :D) - Python Tutorial: Real World Example - Using Patreon API and Pillow to Automate Image Creation

(I love that "Whoops that went too well"-moment at :D)

Python Tutorial: Real World Example - Using Patreon API and Pillow to Automate Image Creation
2020年05月11日 
00:35:19 - 00:52:33