程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Django - incorrect user password added in the background

編輯:Python

django In the project , When we create user Model class , And generate a super administrator , Then we go to admin In the background page , Add a user , Go again login Page login , Will remind us Wrong user name or password .
At this time , The first time we think about going to the database , You will find , The password of the new user we created is clear text , The passwords passed on our landing page are encrypted , Of course, this is not right .
stay app In the catalog admin.py It is not possible to simply register model classes in , We also need to import UserAdmin, Create a new class inheritance UserAdmin, And add the content we want to display in the new class .


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved