MSepehr
MSepehr

Reputation: 970

Can not create superuser in django python admin

I am new in python and I want to create a superuser for admin login, but when I type this command: python manage.py createsuperuser and enter any username with any character, python gives me this error:

Error: Enter a valid username.
This value may contain only letters, numbers and @/./+/-/_ characters.
Username (leave blank to use 'joao'):

How can I fix this problem?

Upvotes: 2

Views: 1289

Answers (1)

ahmed
ahmed

Reputation: 5590

You can specify the username in the command arguments:

python manage.py createsuperuser --username admin

Upvotes: 3

Related Questions