How to reset Django admin password?

前端 未结 21 1702
遥遥无期
遥遥无期 2020-12-12 08:39

I am using Django (version 1.3) and have forgotten both admin username and password. How to reset both?

And is it possible to make a normal user into admin, and then

21条回答
  •  醉梦人生
    2020-12-12 09:39

    Another thing that is worth noting is to set your user's status is_staff as active. At least, that's what makes it works for me. For more detail, I created another superuser as people explained above. Then I go to the database table auth_user and search for that username to make sure its is_staff flag is set to 1. That finally allowed me to log into admin site.

提交回复
热议问题