Customize User Profile Model - Django Blog #27

preview_player
Показать описание
In this video we'll start to customize our User model to add more fields by creating a new Profile model and associating it with our User model.

It's hard to add things to the User model, instead we can extend it by creating a new model and giving it a OneToOne association with the User model.

That's what we'll do in this video to add a bio to our User Profile.
Рекомендации по теме
Комментарии
Автор

▶️ Watch Entire Django Blog Playlist ✅ Subscribe To My YouTube Channel:
▶️ See More At: ✅ Join My Facebook Group:

Codemycom
Автор

Best tutorial on python, django and the mentor also....i have learned a lot from you.
More subscribers and likes are appreciated for him..

rahamanhabib
Автор

This is great just starting in django for about a week and wanted to overload a the basic authentication user model. this was the perfect speed for beginners as long as you have your files open in tabs in your IDE and your webpage already in browser.

MmKayUltra
Автор

What an awesome explaination. Deserve more views for sure.

harshaldeshpande
Автор

i always come to you when ever my site has bugs, you are awesome dude

gabrilexrosario
Автор

Great video as usual. My question however I, what if I have multiple user groups and I want to provide specific fields in which each group can enter related information based on their roles in an organisation or setup

tyronemguni
Автор

Thanks for making this video. Very clear explanation. I'm trying to make a simple user profile to add a URL for an avatar to implement later with a Vue component.

motiv-a
Автор

Greate tutorial, this works. However I think it we should create a separate app dedicated to users and put in a custom user model just to keep things a little entangled or unbundled for ease of scaling and updating.

kelvinmacharia
Автор

Bro u r king . u don't know how u helps me

swastiktyagi
Автор

That still doesn't answer the main question: How does a user create and edit a profile?
You've done all this through the admin page, but we didn't get to see how you set it up so the user does it himself.

pavln
Автор

Hello!
Great video as always 😁🥰
But i have a question.
How am i going to create the Profile model right after i created a user in django?

berkefekeskin
Автор

Hi, First of all thanks for the tutorials. I have learned so much from them. Can you please make tutorials on Pygame? Please do it. Thanks, Love from Bahrain 🇧🇭 ❤️

farhanfaisal
Автор

hello, great video I'm learning a lot with you. Can I customize the width of a CharField or ArrayField for example? And how?

giovanniramospedrozo
Автор

How can I make using e-mail field instead of user field??

philippnazarenko
Автор

Great as always. I am wondering how we can add a date column in admin / profile page so we know as admin when that profile was created. Appreciate if anyone can solve this for me thanks

letslearnui
Автор

Sir, how to use Mail id or Mobile Number in place of Username for Authentication

nagendranfriends
Автор

I found that I had to do the following in models.py for the migration to work properly : bio = models.TextField(null=True)

briangreenberg
Автор

if i change our profile model's name as Profilex, i made all the changes, it didnt work, why ? Must be Profile ?

mehmetali
Автор

class LoginViewSet(ViewSet):
def create(self, request):

try:
user = authenticate(request, username=request.POST.get('username'),
if user:
token, created =

return Response({'message':['welcome', request.POST.get('username')], 'your login token is':token.key}, 200)

return Response({'message':'invalid credentials'}, 401)
except Exception as e:
return Response({'data': '', 'message': str(e)}, 500)





i have made loginapi view using viewset now i want to add user profile view in it can you please tell me how to do that

piyushgupta