reference: https://stackoverflow.com/questions/18503770/how-to-create-user-from-django-shell
user@host> manage.py shell
>>> from django.contrib.auth.models import User
>>> user=User.objects.create_user('foo', password='bar')
>>> user.is_superuser=True
>>> user.is_staff=True
>>> user.save()'Server System > Django' 카테고리의 다른 글
| [Django Rest] Allow Empty String in CharField (0) | 2022.05.27 |
|---|---|
| [Django] ManyToManyField Rest Framework Create and Update (0) | 2022.05.12 |
| Django and GraphQL (0) | 2020.05.29 |