Customize User Profile Model - Django Blog #27

Поделиться
HTML-код
  • Опубликовано: 10 сен 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 RUclips 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..

  • @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.

  • @harshaldeshpande2633
    @harshaldeshpande2633 4 года назад +2

    What an awesome explaination. Deserve more views for sure.

  • @gabrilexrosario
    @gabrilexrosario 3 года назад

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

  • @hahahahahaha8747
    @hahahahahaha8747 8 дней назад

    it was amazing thank you sir

  • @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

  • @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.

  • @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.

  • @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

  • @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...

  • @swastiktyagi8246
    @swastiktyagi8246 3 года назад

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

  • @shawnbeans7389
    @shawnbeans7389 3 года назад +1

    Epic Video.

  • @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?

  • @waleedwaleed3452
    @waleedwaleed3452 2 года назад

    This guy is awesome ..

  • @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?

  • @teekumar5056
    @teekumar5056 2 года назад

    Thanks!

  • @musakazem2998
    @musakazem2998 3 года назад

    thank you

  • @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.

  • @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

  • @everythingjdm8057
    @everythingjdm8057 Год назад

    how do we view somone else profile

  • @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

  • @raziessa2932
    @raziessa2932 4 года назад

    Nice

  • @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

  • @nagendranfriends3153
    @nagendranfriends3153 4 года назад

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

  • @kidsworld1801
    @kidsworld1801 2 месяца назад

    how to make logout functionality

    • @Codemycom
      @Codemycom  2 месяца назад

      I have videos on that all over the channel

  • @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)

  • @fabiof.deaquino4731
    @fabiof.deaquino4731 4 года назад +1

    👍

  • @swamiyedla8191
    @swamiyedla8191 3 года назад

    How to Create and browser profile

    • @Codemycom
      @Codemycom  3 года назад

      keep watching the playlist