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
- [Answered ]-Using unittest.mock to mock a DRF response
- [Answered ]-How to package custom lessc into django project? (using django-pipeline)
- [Answered ]-Using jQuery to Read a JSON File Generated by Django's Serialization
- [Answered ]-Django: order QuerySet by whether a field value is in a list
Source:stackexchange.com