djangoauthenticationweb-applicationssuperuser

can not login in production /django


I successfully deployed my django webapp but now I am unable to login as superuser even if I put correct credentials

Screenshot


Solution

  • If "deployed" means a new environment, you have to migrate everything and create a new superuser.

    BTW you can dump your db with

    manage.py dumpdata > dump.json
    

    and load to the new environment with:

    manage.py loaddata "path/to/file/dump.json"
    

    For more information: dumpdata and loaddata