Customize User Profile Model - Django Blog #27

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 ก.ย. 2024
  • 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.

ความคิดเห็น • 60

  • @Codemycom
    @Codemycom  4 ปีที่แล้ว +3

    ▶️ Watch Entire Django Blog Playlist ✅ Subscribe To My TH-cam Channel:
    bit.ly/3bWN6wj 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 $30 off with coupon code: youtube1 bit.ly/2VC9WUN

  • @rahamanhabib1347
    @rahamanhabib1347 4 ปีที่แล้ว +1

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

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว +3

      Wow thanks!

  • @harshaldeshpande2633
    @harshaldeshpande2633 4 ปีที่แล้ว +2

    What an awesome explaination. Deserve more views for sure.

  • @MmKayUltra1
    @MmKayUltra1 3 ปีที่แล้ว

    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.

  • @gabrilexrosario
    @gabrilexrosario 3 ปีที่แล้ว

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

  • @hahahahahaha8747
    @hahahahahaha8747 10 วันที่ผ่านมา

    it was amazing thank you sir

    • @Codemycom
      @Codemycom  7 วันที่ผ่านมา

      Most welcome

  • @tyronemguni3895
    @tyronemguni3895 3 ปีที่แล้ว +2

    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

  • @motiv-a
    @motiv-a 4 ปีที่แล้ว

    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.

  • @berkefekeskin9172
    @berkefekeskin9172 ปีที่แล้ว

    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?

  • @pavl3n
    @pavl3n 2 ปีที่แล้ว +1

    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.

    • @Codemycom
      @Codemycom  2 ปีที่แล้ว +1

      That may be your main question, it's not the main question of this video. I have plenty of videos on that sort of thing on the channel.

  • @kelvinmacharia3715
    @kelvinmacharia3715 ปีที่แล้ว

    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.

    • @Codemycom
      @Codemycom  ปีที่แล้ว

      Whatever floats your boat

  • @shawnbeans7389
    @shawnbeans7389 3 ปีที่แล้ว +1

    Epic Video.

  • @swastiktyagi8246
    @swastiktyagi8246 3 ปีที่แล้ว

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

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว

      Happy to hear it!

  • @giovanniramospedrozo1494
    @giovanniramospedrozo1494 2 ปีที่แล้ว

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

  • @farhanfaisal6620
    @farhanfaisal6620 4 ปีที่แล้ว +1

    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 🇧🇭 ❤️

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      Yeah I'll be doing pygame soon...

  • @waleedwaleed3452
    @waleedwaleed3452 2 ปีที่แล้ว

    This guy is awesome ..

  • @teekumar5056
    @teekumar5056 2 ปีที่แล้ว

    Thanks!

  • @musakazem2998
    @musakazem2998 3 ปีที่แล้ว

    thank you

  • @letslearnui
    @letslearnui 3 ปีที่แล้ว

    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

  • @raziessa2932
    @raziessa2932 4 ปีที่แล้ว

    Nice

  • @philippnazarenko7090
    @philippnazarenko7090 ปีที่แล้ว

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

    • @Codemycom
      @Codemycom  ปีที่แล้ว

      Sorry, I don't discuss that in this playlist.

  • @everythingjdm8057
    @everythingjdm8057 ปีที่แล้ว

    how do we view somone else profile

  • @fabiof.deaquino4731
    @fabiof.deaquino4731 4 ปีที่แล้ว +1

    👍

  • @briangreenberg153
    @briangreenberg153 3 ปีที่แล้ว

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

  • @kidsworld1801
    @kidsworld1801 2 หลายเดือนก่อน

    how to make logout functionality

    • @Codemycom
      @Codemycom  2 หลายเดือนก่อน

      I have videos on that all over the channel

  • @nagendranfriends3153
    @nagendranfriends3153 4 ปีที่แล้ว

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

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      Too complicated to explain in a comment

    • @nagendranfriends3153
      @nagendranfriends3153 4 ปีที่แล้ว

      @@Codemycom Can you please make a video in this sir .

    • @rahamanhabib1347
      @rahamanhabib1347 4 ปีที่แล้ว

      @@Codemycom that is my question also...it would be great to make another video based on it ...thanks in advance

    • @chetanniradwar6603
      @chetanniradwar6603 ปีที่แล้ว

      hi

    • @chetanniradwar6603
      @chetanniradwar6603 ปีที่แล้ว

      @@rahamanhabib1347 hi

  • @piyushgupta9051
    @piyushgupta9051 3 ปีที่แล้ว

    class LoginViewSet(ViewSet):
    def create(self, request):
    try:
    user = authenticate(request, username=request.POST.get('username'), password=request.POST.get('password'))
    if user:
    token, created = Token.objects.get_or_create(user_id=user.id)
    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

  • @swamiyedla8191
    @swamiyedla8191 3 ปีที่แล้ว

    How to Create and browser profile

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว

      keep watching the playlist

  • @mehmetali1945
    @mehmetali1945 3 ปีที่แล้ว

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

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว

      You have some type somewhere