Custom User Model with email login (DJANGO)

Поделиться
HTML-код
  • Опубликовано: 23 ноя 2024

Комментарии • 87

  • @faisalnazik
    @faisalnazik 4 года назад +17

    I was struggling the whole day with the CustomerUser Model , and finally find this video, that was awesome .

  • @SujeetKumar-bc3br
    @SujeetKumar-bc3br 6 месяцев назад

    Mitch, you are killing it with this Django email login tutorial. Ever thought of bringing in FilterBounce to the mix? I began with their free plan and, boy, was I surprised by the accuracy. I stopped wasting leads because other tools would mislabel them as risky.

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

    Thank you so much Mitch, you've saved me a tone of days of scratching my head. Blessings man.

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

    Just wanted to say thanks a lot! Working like charm still in Oct 2021!

  • @gankidevi7289
    @gankidevi7289 6 месяцев назад

    Yo, Mitch, this Django custom user model is slick. Just a thought - might want to consider showing the wonders of FilterBounce in a new video. I use their api for contact form verification and lost leads have been a thing of the past. FilterBounce accuracy is unrivaled.

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

    I have been trying create a custom user model last three days, now thats the working solution. But maybe you forget fieldsets which is important for groups and permissions.

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

    hell yeah you are awesome man
    To be honest, I don’t know how you manage to do such all this stuff but I understand all things you said a good job. Very well done!

  • @nahidujjamanhridoy9677
    @nahidujjamanhridoy9677 3 года назад +2

    How about the option for users to log in with either the username or email or phone number just like facebook?

  • @254_Cyrus
    @254_Cyrus 3 года назад +2

    Hello Mitch. I am grateful for the course and finding you on RUclips, cheers mate. I have a quick question, how can I add say a usertype.
    In my app we have custom Google and Twitter Sign In but problem is they're at the FrontEnd, and its a pain redoing what the guys have done. How can I add a UserType thats sent from the FrontEnd say email, google or twitter to our custom Account User?
    I am getting some wierd errors and would appreciate your help on this. Cheers.

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

    Hai again ..
    Thanks for not writing HTML, but to copy and paste it ..
    But to tell more detail about Django codes ...:)

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

    19:05
    DO NOT create user passing "password" inside a constructor instead of calling set_password method - that way you avoid encryption and password is not secured.
    It's a great tutorial though, really helped me :)

    • @stimpl2804
      @stimpl2804 2 года назад +2

      But it isn't passed inside a constructor, it's passed to create_user() which then calls the set_password() method.

    • @Sunilyadav-lw9bq
      @Sunilyadav-lw9bq Год назад

      @@stimpl2804 this is actually a method not a constructor

  • @amir.tricker313
    @amir.tricker313 2 года назад

    hi i exactly do the same and also copy your code but after creating a superuser i can't login in admin panel... i do everthing but it doesn't work... please help me!!

  • @hosenmdaltaf
    @hosenmdaltaf 4 года назад +1

    For so long waiting for this, finally.. 😍

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

    the image filepath does not work. Where would you recommend I start looking? I looked in the Account class which lead me to the get_default_profile_image function. i changed what gets returned but the change wasnt reflected on the admin page even after clearing my cache.

  • @ingafter6335
    @ingafter6335 3 года назад +4

    Hi Mitch,
    Thanks a lot for this great tutorial.
    But I have no idea yet how to use them (the users) in a real world project.
    I mean:
    1. How to limit user as normal user to do something.
    2. How to limit user as admin to do something.
    Can you show them please ...
    Thanks.
    BR,
    I am Nyoman from Bali, Indonesia

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

    Thanks. If i created custom user model and named it 'CustomUser', then it can be accessed in admin panel by URL: /customuser. How can i modify this url, if i want it to be /user (not 'customuser')?

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

    i dont no what is wong but when i add the models and try the login in admin this error is showing up no such column: account_account.is_staff

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

    I took a small variation from your tutorial. I did not include the username field in my Account class. After a lot of work I make almost everything to work. When I get into the admin page, select accounts and select a particular account I go to the admin/myagendas/account/1/change/ url and get an error because the AccountForm (venv\lib\site-packages\django\contrib\admin\templates\admin\includes\fieldset.html) expects the field "username". The error I get is "Key 'username' not found in 'AccountForm'. Choices are: email, ... Is there a way to tell the admin site that there is no username field? Thank you. Great tutorial.

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

    Thank you very much for the video, could you help me?
    How do I register users with a valid or existing email? ... thanks in advance

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

    I'm having problems with the account module, when i removed it from the installed apps it worked

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

    Hi! I am quiet confused with the 20:55 part. Why do you follow this process?
    Thanks :)

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

    In settings.py AUTH_USER_MODEL = "account.Account" is resulting in
    Attribute error: can't set attribute
    How can I solve it? Pls tell.

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

    I create a post group,and how i show in my user and add tha group in customer user model , please help

  • @codewithluq
    @codewithluq 4 года назад +3

    Hey Mitch, Something has happended to me here on this episode..After writing the Account Model... I cant login into the Admin panel despite successfully creating a superuser. So Login with correct email and password cant happen. Wondering if anyone is getting the same issue here

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

      Delete your database and recreate

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

      I have the same problem. I deleted my database but it didn't work :(

    • @JitenderKumar-tl7zr
      @JitenderKumar-tl7zr 3 года назад

      @@miguele7563 Don't just delete the database delete the data inside migrations file as well and then recreate

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

      @@JitenderKumar-tl7zr also did this but still didn't worked

    • @JitenderKumar-tl7zr
      @JitenderKumar-tl7zr 3 года назад

      @@londachaagaya4248, please share your models.py and admin.py file Github link

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

    WOooooooow Exellent work Manaana

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

    Great video. I don't understand one thing... why in "create_user" function password=None but in "create_superuser" is not?

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

    Just found your videos today, very great content! Helps me a lot! The python magic part I like most :D

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

    I can save superuser, but i have an error, "AttributeError: 'NoneType' object has no attribute 'is_admin'
    ", but my models.py has is_admin field.

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

    I was having this error: "Unable to create the django_migrations table (permission denied for schema public" and could not make migrations.
    postgres=# ALTER DATABASE OWNER TO ;
    This fixed it for me.

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

    Thank you django master!

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

    Could you do a short video on how to inspect python libraries' source code?
    They are 90% advance level code and it gets tricky just trying to understand an implementation.

    • @codingwithmitch
      @codingwithmitch  4 года назад +3

      I dunno I just poke around and search for stuff I don't understand

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

    good luck man. I'm thinking of developing such web app

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

    Thank you Mitch. This helped me a lot. And btw you are cute 😅

  •  3 года назад

    Hi, why in db I can see all the passwords and how avoid?, thanks

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

    Can i relate other tables with the abstract user table?
    thanks a lot

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

    One thing I find funny is the ego of people especially when it comes to solving problems they cannot. Sometimes a person creates an application let say a chat application but there is a bug in code there cannot solve because they don't understand the code and person comes up with a solution to that problem so that everyone can benefit but the creator is envious so they delete the comment out of jealous so they can take the credit, so sad.

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

    How to get current user logged id in custom user model ...

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

    Thats a lot of hassle for letting people log in with email, it seems like django is really inflexible in that regard.

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

      Especially if you consider that users still have to state a username

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

    I can't log in without the admin, but someone tried to log in without the admin. Note: I can't speak English

  • @Spirit_StormStorm
    @Spirit_StormStorm 11 месяцев назад

    Thank you, that's good ...

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

    When I do migration , it's still asking my username firstly

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

      Have you added this AUTH_USER_MODEL = 'customauth.MyUser' to your settings.py ?

    • @ashharmansuri6816
      @ashharmansuri6816 4 года назад +1

      @@kariminic yes bro I have added Nd I have found the problem I had miss typo

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

      @@ashharmansuri6816 Thats good. Happy Coding.

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

      @@kariminic yes bro

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

    You are amazing.

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

    the best !

  • @richardokonicha
    @richardokonicha 4 года назад +1

    Cheers🥂

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

    Awesome

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

    thanks a lot bro

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

    for ubuntu users:
    psql -h localhost -U myuser mydatabase

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

    play on 2x....

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

    thanks

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

    what is "is_admin" it doesnt exist in the documentation

    • @JitenderKumar-tl7zr
      @JitenderKumar-tl7zr 3 года назад

      It means that the user is SUPERSUER if "is_admin" is set to True

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

    You talk too much rubbish, just get the work done.

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

      Don't be such a dick. This is a great video, I'm not sure how he can go through so much detail and talk less, maybe you can show us how. Very useful for me. Thanks Mitch

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

    you dont need to mess with that get_profile_images_filepath.... just use in template and its done

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

    Thanks. If i created custom user model and named it 'CustomUser', then it can be accessed in admin panel by URL: /customuser. How can i modify this url, if i want it to be /user (not 'customuser')?