Custom User Model | Explore Django

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 พ.ย. 2024

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

  • @timoyk
    @timoyk 2 หลายเดือนก่อน +3

    2 years later and it's a banger, thank you very much.

  • @proletar-ian
    @proletar-ian 7 หลายเดือนก่อน +4

    I've tried to pick up Django several times over the last few years and always moved on to another technology after getting frustrated with the specific problem of setting up a custom user and integrating it with auth. I finally got it working after watching this video, so thank you! :)
    Django really needs to make a few doc pages to cover this

    • @judahwilson6756
      @judahwilson6756 5 หลายเดือนก่อน

      same.. its a little wack imo

  • @santoshbhattarai2527
    @santoshbhattarai2527 2 ปีที่แล้ว +5

    Currently doing college project using many django customizations and I see some django tutors explaining those. What a timing. Thanks Stein.

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

      Nice 😁 glad you liked it 👍🏻

  • @verdyschemaya3714
    @verdyschemaya3714 10 หลายเดือนก่อน +1

    hello, I followed your tutorial carefully, and I admit that it was well done. I was able to connect with the super user. and for my application I made a login page to access the application interfaces and there too the super user can access it perfectly. only by creating a simple user in the administration site, even by checking on super user and activating the user, he does not connect either to the admin login page, nor to the application page

  • @b-k-i-t-w
    @b-k-i-t-w ปีที่แล้ว +2

    This video, and your contribution to my knowledge of Django, is simply indescribably great. Thank you.

  • @rahimrahim2720
    @rahimrahim2720 5 หลายเดือนก่อน +1

    Thanks, that's exactly what I needed for my project .

  • @wondmagegnabraham8524
    @wondmagegnabraham8524 10 หลายเดือนก่อน +1

    Thank you very much. This way easier than the other I found.

    • @CodeWithStein
      @CodeWithStein  10 หลายเดือนก่อน

      Thanks, glad to hear that :-D

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

    Thanks Stain, I love every time you upload a new video because I learn new things about Django

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

      Great 😁 that’s my goal 😁

  • @Top5Faqts
    @Top5Faqts 8 หลายเดือนก่อน +1

    thx! what should i do if i need 3 types of users?

    • @CodeWithStein
      @CodeWithStein  7 หลายเดือนก่อน

      Hey, you can just add a select field or similar to the database model :-)

  • @albertosdneto
    @albertosdneto 2 หลายเดือนก่อน +1

    Great vídeo!
    When you open the user at the admin ir does not show the box that shows the current permissions assigned to that user. How would you fix that so you can change the permissions of a user?

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

      Hey, thanks :-) I don't think you can use the built it user permission system for custom user models :/

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

    Thank you so much! I really apreciated your video!

  • @kunalverma8536
    @kunalverma8536 9 หลายเดือนก่อน +1

    i am getting an error while creating superuser stating :
    UserManager._create_user() missing 1 required positional argument: 'username'
    i am not using username and using name as username
    can you help with that?

    • @CodeWithStein
      @CodeWithStein  9 หลายเดือนก่อน

      Hey, that depends on how you changed the code. But there should be a required field option on the model

  • @nurullo.salaydinov
    @nurullo.salaydinov 2 ปีที่แล้ว

    It is really useful to use custom user model, I have used AbstractUser but not UserManager Thanks Stein 👍👍👍

  • @arowmike
    @arowmike 7 หลายเดือนก่อน +1

    Thank you, Stain, for this wonderful video.
    In my model, both first and last names were provided and I applied this method, but the name was returned empty. I tried returning return f"{self.first_name} {self.last_name}", still empty.
    What should I do if I want to concatenate the first_name and last_name into the name field?

    • @CodeWithStein
      @CodeWithStein  7 หลายเดือนก่อน

      Hey, you're welcome :-)
      Hmm, that sounds weird. It looks correct, but it's hard for me to know without looking at the rest of your code :/

  • @fede-tk3rm
    @fede-tk3rm ปีที่แล้ว +1

    thanks! just what i needed

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

    Great tutorial Stein, thanks very much.

  • @sakshirekhi1040
    @sakshirekhi1040 8 หลายเดือนก่อน +1

    Thankyou so much.. but is is giving me an issue AUTH_USER_MODEL referstomodel appname.User that has not been installed.. Please can you help me in solving this issue?.

    • @CodeWithStein
      @CodeWithStein  8 หลายเดือนก่อน

      Hey, are you sure you typed it correctly? I think it should be account.User, not appname.User

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

    I really love your content Stein❤❤❤

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

    Looks very good Stein, I think I will replace my users app

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

    your videos are great stein. Thank you for all you great work. really appreciate it

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

    Very good love this a lot. Thank you

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

    Thank you with the tutorial. I have one issue. When I add user from the admin site his password is not hashed and he can't login with it

    • @CodeWithStein
      @CodeWithStein  10 หลายเดือนก่อน +1

      Hmm, thats not good :/ will come back to you with an answer 👍🏻

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

    What about if I just want to add some additional fields to the original user mode? let's say the phone number.

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

      Not possible :/ and this is also the way Django wants us to solve it 🤷🏼‍♂️

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

      ​@@CodeWithSteinThanks for your response bud.

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

    React or vue in your opinion ??

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

    thank you so much for your help, this is exactly what i needed!

  • @G-3-A-R-Z
    @G-3-A-R-Z 2 ปีที่แล้ว

    Good helpful content as always.

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

    u don't have to check if the user passed an email because it is a required argument!

  • @jamescapparell5673
    @jamescapparell5673 ปีที่แล้ว +5

    Teaching is more than just showing us your typing skills. Where does this information come from? What is the logic that you are implementing in the code? Why do it this way what are trade offs? Don't feel bad many of the other so called django teachers suffer from the same limitations.

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

      Hey, thanks for the feedback :-)
      It's mostly just because it's really hard to find the balance in a tutorial. If I explain too much, many people will "complain" and say find it slow and boring, and if I explain too little, it can be too hard for beginners to follow. So this is just the way I have landed on making my videos :-) I know that there should be a lot more explanations on many of the subjects I have, but it's hard to do this :P

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

      Great tip ☺️

    • @wisdomovermoney3394
      @wisdomovermoney3394 4 หลายเดือนก่อน +1

      Why should he feel bad for proving high quality content for free? If you want to create custom stuff you need to keep up with the coding process, nobody can explain everything.

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

    ᑭᖇOᗰOᔕᗰ