Creating a Custom User Model For Authentication | Learn Django REST Framework #7

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 ก.ย. 2024
  • We create a custom User model that we shall use for authenticating our users. This model is created using the AbstractUser class.
    SOURCE CODE:
    github.com/jod...
    FOLLOW ME:
    GITHUB:
    github.com/jod35
    TWITTER:
    / jod35_

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

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

    Great Exaplanation Ssali! Thanks 🙌

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

    In 8:26 you replace two strings at the same time by writing only one string. How do you do that?

  • @rolandonunez1893
    @rolandonunez1893 6 หลายเดือนก่อน

    22:12 I can't create new post since I believe you set the viewsets. At this point, are you working with the mixins class from previous videos or you just made a post viewset? Thank you!

    • @SsaliJonathan
      @SsaliJonathan  6 หลายเดือนก่อน

      I am using the previous logic.

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

    really great, thanks

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

    I have a problem after createsuperuser >>> data to long for column 'password' at row 1 22001

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

      Can you please check your user model? chances may be high that you have the password field having a max_length that is short.

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

      @@SsaliJonathan thank you 🙌

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

    i have a problem with my code, after creating my superuser, i login and have no information on my admin page

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

      Have you registered your models with the admin site?

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

    Thank you! 👏👏👏

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

    Awesome. Thanks

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

      I am really glad you liked the video

  • @gracyfg
    @gracyfg 4 หลายเดือนก่อน

    how do I do social authentication on top of this ?

    • @SsaliJonathan
      @SsaliJonathan  4 หลายเดือนก่อน

      Hi. Please check out a Django package called Django AllAuth

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

    Thanks bro

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

      Glad you liked it

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

      @@SsaliJonathan I follow you from Azerbaijan and I like your videos🖤

  • @4ktmiguer
    @4ktmiguer 11 หลายเดือนก่อน

    i've tried to pass like this:
    AUTH_USER_MODEL = "core.CustomUser"
    and the full path to the model is:
    core/models/account_models.py
    in the terminal the output is this:
    django.core.exceptions.ImproperlyConfigured: AUTH_USER_MODEL refers to model 'core.CustomUser' that has not been installed

    • @SsaliJonathan
      @SsaliJonathan  11 หลายเดือนก่อน

      check if you have the core in your INSTALLED_APPS list

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

    Why email isnt models.EmailField?

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

      well, it is just some small mistake that I made during recording.

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

    How to log out the user?

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

      Hey man, check out my videos on JWT authentication. Logging out happens when an access token expires. Logging back in will happen when we use a fresh token to aquire a fresh JWT.

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

    Awesome, thanks