Answers for "django add user through command line"

0

create django user command line

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()
Posted by: Guest on February-20-2021

Code answers related to "django add user through command line"

Python Answers by Framework

Browse Popular Code Answers by Language