Custom Django User Model // DJANGO Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 ก.ค. 2024
  • How to Create a Custom Django User Model
    The Guide: kirr.co/ygijli
    Repo: kirr.co/v2m266
    Chapters:
    0:00:00 - Welcome
    0:00:52 - Before we get started
    0:03:47 - Create the Abstract Base User
    0:17:25 - Create the User Model Manager
    0:17:25 - Change Auth User Model to our Custom Model
    0:27:14 - Reload the Database with Fixtures
    0:34:00 - Forms & Admin for our Custom User
    0:43:29 - Add a Required Field to the User Model
    0:50:47 - Update Login & Register Forms
    0:56:28 - Login & Register Views
    -----
    Amazing Starts Small. Learn to build great products with code.
    Enroll: kirr.co/ni5fia or Subscribe: kirr.co/7l2sv4/
    -----
    Questions? kirr.co/wmdnzz/
    Suggestions? kirr.co/5d7m1r/
    All of my step by step projects: kirr.co/ni5fia/
    My equipment:
    Laptop: amzn.to/2c965EL
    4k Camera: amzn.to/2cb0JeS
    Drone/Aerial Video: amzn.to/2cCUgLq
    Flexible/Travel Tripod for DSLR: amzn.to/2d13rXi (I highly recommend this too: amzn.to/2ckauYr)
    General Purpose Tripod: amzn.to/2d4xNUS
    Webcam: amzn.to/2bZEc7I
    Camera Mic: amzn.to/2cb0PTp
    Studio Mic: amzn.to/2cCdNc3
    Mic Arm (for Studio): amzn.to/2cCepyd
    Shock Mount (for Studio): amzn.to/2c97uLN
    Phone: amzn.to/2c97R8X
    Tablet (and portable external monitor) : amzn.to/2c5Fqdx
    External Hard drives: amzn.to/2c5FvxV
    Headphones (mic used for travel recording): amzn.to/2c5GGNO

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

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

    Should I update this video? It's 2022 -- perhaps it's time? Please comment!

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

    Man, you are making Django even more pupular, making this awesome, great detailed but complete tutorials. Keep going.

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

    Justin, you are the man! Really appreciate this upload bra!

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

    Finally, someone from dev world who is not trolling with soft skill videos, and providing useful content.Well done, Sir.

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

    Where have I been since this video created? This video is great and save my time a lot. Especially the Fixtures concept. Thx bro.

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

    YOU ARE THE BEST! 👏🏻👏🏻👏🏻👏🏻 That was some goddamn awesome explanation.

  • @AliKhundmiri
    @AliKhundmiri 6 ปีที่แล้ว +6

    Amazing video!! Really helpful.

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

    Much appreciation for this video Justin! I learnt a lot

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

    Really helpful video man. I don't know how this video doesn't have the likes quantity that it deserves !!!!! I just want to tell you that you got a new sub now

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

    After disliking few youtubers,I am feeling fortunate by pressing the like button

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

    thank you so much man. respect for your work

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

    just found you sitting here with all i need exactly! i'm so frustrated with this problem from days. well thanks to angels like you on earth to save my a**. appreciate your work again thanks man!

  • @gcloud8397
    @gcloud8397 6 ปีที่แล้ว +11

    Justin is on fire

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

    Wow. This is a brilliant explanation. Wowwwwwwwww.... Thank you very much

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

    Thank You so Much Justin

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

    Really Nice and clear explanation!!

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

    i love this channel.

  • @kinowesunga563
    @kinowesunga563 6 ปีที่แล้ว

    Great Tutorial!!!

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

    Thank you so much for ur guides

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

    Justin you are the best!

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

    hey.. best tutorial ever on youtube.. n i can say coding entrepreneur is the best resource to learn django.. ❣️❣️💪🏾

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

    U deserve millions of subscribers!

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

    great video

  • @imransuleiman2684
    @imransuleiman2684 5 ปีที่แล้ว

    Thanks man.

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

    Tnx for your tutorial U R the best

  • @intruder2.0
    @intruder2.0 ปีที่แล้ว

    2023 and this is still very relevant to me thank you so much

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

    really good

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

    thnk u, well explain

  • @simulationcosmos399
    @simulationcosmos399 5 ปีที่แล้ว

    justin i buy your lots of udemy courses and let me tell you one thing..you are the mentor i always wish for..and i call you sir amd you are my teacher and i also wish that someday i will you meet you face to face..thank you sir

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

    Thank u very much! You helped me a lot, I was getting crazy with this lol. But I have a question, do you have any video that teaches how to work with two forms in the same view ?
    greetings from Brazil!

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

    any tutorial about how to adding logo in admin with name thank you...

  • @raziakhan9052
    @raziakhan9052 5 ปีที่แล้ว

    Dear sir my name is Mustafa Warsi it very Awesome, I am a YOUR BIG FAN

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

    Yes pls, make a vlog of your leanings

  • @nick-hq8oz
    @nick-hq8oz 5 ปีที่แล้ว +3

    if you get "AttributeError: 'Manager' object has no attribute 'get_by_natural_key' " when creating a superuser try including PermissionsMixin and adding it to the User class. Also add "objects = UserManager ()" the class.

    • @a99barnsey
      @a99barnsey 5 ปีที่แล้ว

      add the following to your user model: objects = UserManager()

  • @greghalliday4226
    @greghalliday4226 5 ปีที่แล้ว

    This is great. One thing I have been trying to model correctly is the situation where you want to record details of people who may not be users, for example, they may be a supplier contact or an internal contact, the complexity being that they may become a user and that record should be related to the user account. Is there a standard way to handle that?

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

    Any video on AbstractUser instead of AbstractBaseUser ??

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

    HAHA & AHA 😂 I just had that error a few days ago 25:48
    My learning process is extremely 😁😝 😬 ,..
    1.i get the error
    2.contemplate.. 🤔
    3. get 😞😐 and then a few days..
    4. get frustrated,
    5. erase
    6. try again
    7. then you see related videos / blogs about it.. after a few days / months/ of finally recovering from every failure 😂
    Thank you for this video...:

  • @yusuffarag1149
    @yusuffarag1149 5 ปีที่แล้ว

    You sir, are a lifesaver. Thank you for making this.

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

    I thought the User had much more than 3 fields. e.g is_active, is_staff, username, email, passwprd, so what's all this about with only 3 fields?
    If the default User model is extended when you use AbstractUser then shouldn't it also inherit the rest of the fields that come with the User model?

  • @riadhazzouz6430
    @riadhazzouz6430 5 ปีที่แล้ว

    Can I create two custom users, one for an employee and the other for the company ? The idea is the employee can register and login to create his CV, then the company also can register, login to check CVs.

  • @SaurabhSingh-sm2mt
    @SaurabhSingh-sm2mt 4 ปีที่แล้ว

    Thanks a lot man, that really helped a lot. On a side note can you please tell how can i integrate this with a social media login like Facebook or Google.
    Thanks in advance :)

  • @kaustavsengupta8757
    @kaustavsengupta8757 5 ปีที่แล้ว

    Justin when are you going to put a new update version of this course on Udemy...??..by the I love your django series in udemy

  • @Omni_G
    @Omni_G 6 ปีที่แล้ว

    Hi, I'm very confused with the whole staff admin thing. Do we not create the regular user? From what I've read staff and admin can log in to the admin side. I'm trying to create a User Model where user can be one of 3 roles:
    - Course Chair
    - Course Creator
    and finally
    - Admin.
    Only Admin can log in to the admin page.
    So in my model, do I do:
    is_course_chair
    or
    is_staff
    or
    nothing?

  • @Kruiger1993
    @Kruiger1993 6 ปีที่แล้ว

    How do you combine it with the HTML file that the question, and why it is not part of your tutorial?

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

    hello Justin, your guide was really helpful, please could I reference it in my tutorial?

  • @JonesDTaylor
    @JonesDTaylor 6 ปีที่แล้ว

    Hi Justin
    If I use a third-party authentication service (such as oauth2) to register/login my users with their email and password, do I still need to use the custom User model on this video ?

  • @nusk003
    @nusk003 5 ปีที่แล้ว

    Hello Sir, Can we put a autofield to custom user model???

  • @ziaulhasanhamim3931
    @ziaulhasanhamim3931 4 ปีที่แล้ว +11

    how you become so expert on django. share your story. we would love to hear

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

      Like you do with everything in life. Experience, reading docs, dealing with problems and solving those problems. Googling. That's pretty much it.

  • @piyush__khandelwal6824
    @piyush__khandelwal6824 5 ปีที่แล้ว

    Where do i use that create_staffuser method in modelmanager

  • @blabla-kk8bl
    @blabla-kk8bl 3 ปีที่แล้ว

    can u make a video for django-organization

  • @dodokwak
    @dodokwak 5 ปีที่แล้ว

    I'm wondering why we can't use email for the field username ( it's not forbidden) and then just go on with the built-in User instead of creating completely new custom User ? Thx in advance.

  • @changeineed2698
    @changeineed2698 6 ปีที่แล้ว

    I am getting an error 'NoneType' object has no attribute 'save' when ever i try creating a new user from the admin .Please help

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

    Hi ,
    How to add a model field that shows today date . This date field should get automatically updated to todays date

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

    hi, when I try to delete a user I get the following error: IntegrityError at / admin / userprofile / myuser / 23 / delete /
    FOREIGN KEY constraint failed.
    Has it happened to someone the same?

  • @prasathsoosaithasan1281
    @prasathsoosaithasan1281 6 ปีที่แล้ว

    Hey justin, all looks good and works except testing. The moment you introduce a custom user model the order in which migrations are executed starts to matter. This is not a problem in that you can fire 1) `python manage.py makemigrations accounts` first, then 2) `python manage.py makemigrations` and finally 3) `python manage.py migrate`. Unfortunately, this breaks django testing. Django testing uses the DiscoverRunner under the hood which will only call plain old 1) `python manage.py makemigrations` and 2) `python manage.py migrate`. Whenever it does so, the error occurs and you cannot workaround this because you cannot control the make migration order. Do you know a solution to this?

  • @maxvinella941
    @maxvinella941 5 ปีที่แล้ว

    Is this working with django 2.1? I get foreign key error

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

    everything is working perfectly but i am not able to create staff user by admin page

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

    can create multiple superuser?

  • @hamoudarawdh1265
    @hamoudarawdh1265 6 ปีที่แล้ว

    heey after setting the settins to auth_use_model to accounts.use and creating a superuser with email and fullname when i go to admin and sign in it tells me that i enterred the false email or password nd im sure that theyr true , i created anotjer user but the same problem still , i elimnates the auth_user_model from settings and i created a super iser normally it workid when i sign in !!! what should i do please am stuck

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

    Back to this episode from 2022, so good 🫰😃

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

    bro i used pycharm and are install pillow but not work what is problem? and i used sublime when create makemigrations their show "no changes detect" what is problem?

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

    can you make a custom password reset view for this model?

  • @aditya-bl5xh
    @aditya-bl5xh 3 ปีที่แล้ว

    Get natural key error when creating new superuser, please help

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

    How do we add more fields like profile image, city etc during registration.

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

      to add image field you have to install Pillow (python's library that handles files) and inside your models.py file you can use models.ImageField(upload_to='media').
      To save it inside the database make sure you have specified your media root and url in settings.py.
      I would suggest you watch a youtube video on how to upload media files in django it is very easy.

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

    Is it possible to have multiple custom user authentication methods for different users within the same Django app. Like an email and password for one type of user and a pin only for another type of user. Someone please shed some light

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

    good day sir! how can I add a default user group for this Custom Django User Mode?

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

    Hey Justin, I want only those users to login in Admin Page who are already logged in.
    And Show 404 otherwise

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

    Amazing tutorial..!
    I could create a custom model and able to register new users. But after making this change, the admin login is not working?
    Any guess on what could have gone wrong? I'm using django 1.11.12
    Thanks in advance!

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

      same here, i cant login to the admin panel with staff user, which was created by superuser

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

    Not providing a setter for User @property is_staff and is_admin causes UserManager.create_staffuser and UserManager.create_superuser to fail. (Django=5.0.4). Wonder if I should provide a setter for these or if that is a potential security hole (is there some way for a rogue page to change is_admin=True via a User object)

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

    help:
    can not able to login in admin panel

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

    do you have video / how do setting for sublime text editor whith context python/django ?

    • @CodingEntrepreneurs
      @CodingEntrepreneurs  6 ปีที่แล้ว

      +Python My somewhere we do. What are you looking for exactly?

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

      All you need to install to successfull use of st3 as python/django "ide" is Anaconda for python and MAYBE, just MAYBE Djanerio for django templates

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

    I didn't follow your guide, but I did something similar... And it seems correct after seeing your video. My signup, login, logout, remember, email confirmation works... But I can't get password to be reset, using django-allauth! I can't get any information on the web, it has something to do with the reverve not matching for uidb36/key, etc. My custom user does not have a username; Any ideas?

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

    when update this video ?

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

    I'm trying to inherit custom user to another class but it gets IntegrityError at /admin/User/student/add/
    FOREIGN KEY constraint failed error

  • @scofieldwhitefire8399
    @scofieldwhitefire8399 5 ปีที่แล้ว

    Hello Justin.. I'm having a little challenge here... Tried to modify the codes by adding first name /last name to the form.py and it would not show on the database.. Instead I get the error accounts_myuser.first_name has no such colum first_name
    Please how can I fix this

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

    HI how can i join for your full course ????

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

    Can I watch this in 2020, does it require any changes according to django version?

  • @bigfatcrab
    @bigfatcrab 5 ปีที่แล้ว

    Hi, i’m currently making a django base system. I need to create multiple users but with different control to the system. One of these users can only add and view while the others can delete and edit what’s on the system

    • @prikundnani2622
      @prikundnani2622 5 ปีที่แล้ว

      You could add an attribute to the user model called permissions and then adjust the view based on the permissions of the user.

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

    can you tell what is the use clean_password method in Userchangeform

  • @carminetambascia6355
    @carminetambascia6355 6 ปีที่แล้ว

    Hey Justin where is gone you video about Django Forms and 1 hour long?I don't mind to pay for it.

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

    Quick ques: Instead of inheriting AbstractBaseUser, can't I inherit AbstractUser since it already has all these boolean fields that we created ? Thanks !

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

    With this method, every user that I create gets all permissions automatically. How can I limit permissions while creating new user?

  • @annihilationHaven
    @annihilationHaven 5 ปีที่แล้ว

    Doesn't work. Getting a crazy error that you can't do anything about. django.db.migrations.exceptions.InvalidBasesError: Cannot resolve bases for []

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

    Hello Sir, Can you please explain to me clearly how can i populate information to update user profile so the form must look exactly like the way it looks on template without changing the form structure, i want info to be on below input fields thank you in advance.

    Edit Profile


    First Name

    Last Name

    E-Mail*

    Website

    Password*

    Confirm Password*

    Country



    Profile Picture

    Select file
    Browse


    About Yourself


    Facebook

    Twitter

    Linkedin

    Google plus

  • @torroot4142
    @torroot4142 6 ปีที่แล้ว

    this can be helpfully:
    find . -path "*/migrations/*.py" -not -name "__init__.py" -delete
    find . -path "*/migrations/*.pyc" -delete

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

    Does this still work in 2020 guys ?

  • @peterborinski
    @peterborinski 6 ปีที่แล้ว

    Hi Justin. Quick question:
    At 49:08 I don't understand the field add_fieldsets. Why don't you change that too? And if I warry it in my code, it seems to affect nothing. Why is that field even in there and what does it do?

    • @peterborinski
      @peterborinski 6 ปีที่แล้ว

      And also another questions: Changing the forms also doesn't change anything if I implemented the fieldsets. Why do we have to have the form, if they seem to not affect anything?

    • @CodingEntrepreneurs
      @CodingEntrepreneurs  6 ปีที่แล้ว

      `add_fieldsets` is related to your "add new object" form.
      What do you mean changing the forms doesn't change anything?

    • @Lupo9
      @Lupo9 5 ปีที่แล้ว

      @@CodingEntrepreneurs What determines whether a field is shown in the admin view? For example 45:21, you add full_name to the ChangeForm, and then you add it to fieldsets.
      Does it have to be added in both? What exactly is the point of adding it in the Meta class of the form?
      Because I can just do ' fields = () ' in my form Meta class and it works. Is there something wrong with that?

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

    Hi, I am learning the Custom Django User Model. All the things work fine but at 40:02 when I am copying the UserAdminCreationForm and UserAdminChangeForm from the website provided, I am getting this error "django.core.exceptions.FieldError: Unknown field(s) (is_active) specified for User". Anyone can provide a solution. Thanks in advance.

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

    Can you please suggest any third party authentication system that supports this custom user model along with latest 3.11 Django Rest Framework Please.

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

      Django AllAuth and django-rest-auth.readthedocs.io/en/latest/installation.html

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

    For some reason my user's username is being displayed as ('username', )
    Anyone else with the same problem?

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

    Does this work with Django 2.0??? I can't seem to get it working after I finish when I edit the user I get an error... I posted a comment on your tutorial.

    • @sarpk77
      @sarpk77 6 ปีที่แล้ว

      I have the same problem and Ive seen your question also on StackFlow. Have you by chance found any solution to this? Everything was sound up to this point

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

      Ive just found the solution, hope you read this my friend. Ive dropped the database and rebuilt it.- python manage.py sqlflush- and re-ren migrations. eveyrthing works fine. I think it is a problem with adding new fields to the User model

    • @whoisntwhoisit2126
      @whoisntwhoisit2126 5 ปีที่แล้ว

      Django 2.1 will be written completely different and some things are already done for you ect.. so if you are using 2.1+ then you will want to look up a newer tutorial -- but regardless of that -- below
      Yeah, if you change to a custom user model you need to start over with your database, so for one its really smart to start with a custom user model anyways even if very basic, then second important factor is if your data is important then you have to figure out how to copy the data from the old to new database but you will need to "delete" the old so it can make new, also clear every migration folder of everything except the "__init__" file then once you change the model makemigration (appname) and then migrate (appname) and your new model should be up and running if its good.

  • @HpDopeman
    @HpDopeman 5 ปีที่แล้ว

    FOREIGN KEY CONSTRAINT FAILED?? INTEGRITY ERROR??

  • @Dastiny
    @Dastiny 6 ปีที่แล้ว

    I get a
    FOREIGN KEY constraint failed when i try to create or delete a user, can anyone hlep me?

    • @udaysimha5496
      @udaysimha5496 6 ปีที่แล้ว

      user = models.ForeignKey(AuthUser, unique=True,on_delete=models.DO_NOTHING)
      just add on_delete=models.DO_NOTHING as an argument to the call function

  • @raducamman
    @raducamman 6 ปีที่แล้ว

    I have a small issue. I can no longer login in the admin interface with the superuser account. I deleted the database, made new superusers, but the same thing happens. The user is created, but I can't login with it. Any ideas?

    • @abhinavsingh4221
      @abhinavsingh4221 5 ปีที่แล้ว

      Make sure that active field is set to true. Try this: user_object.active = True
      Then
      user_object.save()
      Then try to login.

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

    I am always getting this error - "Please enter the correct email address and password for a staff account. Note that both fields may be case-sensitive."

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

      @@timetosleep8055 check if you have declared is_staff in the model. If yes then check if you are passing that value to be True for the user u want to create. is_staff = True required for the user to have admin access.

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

    I am a beginner and my question is: is this valid for Django 3.0?

  • @varunajmera
    @varunajmera 6 ปีที่แล้ว

    TypeError: create_superuser() missing 1 required positional argument: 'full_name'

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

    CodingEntrepreneurs , how come your Django is so fast and responsive even when it is just a development server. When I do Django, there is still some lags during refreshes while in your video, it's so snappy and responsive like a Single Page Application.

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

      Do you have a lot of apps running? Does your computer have a lot of RAM?

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

      @@CodingEntrepreneurs well, I do have 16 GB of RAM. Maybe it's all those tabs I open in Chrome. When I'm coding, I oftentimes forget that I'm opening a lot of tabs for reference. Maybe that's what's contributing to the slowdown.

  • @sarpk77
    @sarpk77 6 ปีที่แล้ว

    At th-cam.com/video/HshbjK1vDtY/w-d-xo.html&t=2660 , after you define the error, shouldn't you be adding the line -user_obj.full_name = full_name- to the create_user function? How did you manage to create a superuser without that line?

  • @fclinuxnova6079
    @fclinuxnova6079 5 ปีที่แล้ว

    Hi, I think we use "if" to announce that user need to type down the email then looking on your code I think it still do the next line of code after alarm the needed of email.
    CodingEntrepreneurs
    th-cam.com/video/HshbjK1vDtY/w-d-xo.html