How to create user from Django shell || Python Django

Published: 12 September 2022
on channel: Rehmat Qadeer
163
4

Let’s look at how to create a user for Django using Django’s interactive shell? Make sure you have the virtual environment activated, and that you are within the folder that has the manage.py file.

user@hostname$ python3 -m Django shell
import django.contrib.auth
User = django.contrib.auth.get_user_model()
user = User.objects.create_user('username', password='userpassword')
user.is_superuser = False
user.is_staff = False
user.save()


If you like the video please share and subscribe.
********************Follow me*********************
🚩Linkedln:   / rehmat-qadeer-577703178  
🏳Github: https://github.com/rehmat11872

🌟🌟Thanks for supporting keep watching!!!!!🌟🌟


💫Thanks for watching!!!!!!!!!!💫💫💫💕


On this page of the site you can watch the video online How to create user from Django shell || Python Django with a duration of hours minute second in good quality, which was uploaded by the user Rehmat Qadeer 12 September 2022, share the link with friends and acquaintances, this video has already been watched 163 times on youtube and it was liked by 4 viewers. Enjoy your viewing!