Unable to create superuser in django due to not working in TTY

前端 未结 7 1699
南方客
南方客 2021-01-12 05:40

I go through first django tutorial from djangoproject.com and at the very beginning of part 2, which is creating superuser when I run \"python manage.py createsuperuse

7条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-12 06:14

    You can create a superuser using django shell (python manage.py shell)

    from django.contrib.auth.models import User
    User.objects.create_superuser(username='YourUsername', password='hunter2', email='your@email.com')
    

提交回复
热议问题