[Answered ]-Djnago superuser login does not work with –noinput option

1👍

Take a look, the char # is truncating the password.

#BAD
dani@dani / % DJANGO_SUPERUSER_PASSWORD=123#$asdWE
dani@dani / % echo $DJANGO_SUPERUSER_PASSWORD 
123#

Solution: Use quotes, also, export the env var:

#OK
dani@dani / % export DJANGO_SUPERUSER_PASSWORD='123#$asdWE' #<- quotes & export
dani@dani / % echo $DJANGO_SUPERUSER_PASSWORD       
123#$asdWE

0👍

just creating a superuser successfully doesn’t mean you have a superuser with the ability of logging into the admin page.
first you should check if the password correctly set or not
maybe you are setting the environment variable in a wrong way and the password didn’t set so you can test it by changing the password in shell and retry to login to admin page
don’t forget to use set_password function to change password

Leave a comment