2018-07-09 django使用admin管理員報錯

在訪問 http://127.0.0.1:8000/admin/是報錯Please enter the correct username and password for a staff account. Note that both fields may be case-sensitive

原因:沒有創(chuàng)建用戶

解決辦法

# python manage.py createsuperuser???????????

?#輸入Username (leave blank to use 'root'): admin????????????

#輸入用戶名Email address: admin@runoob.com???????????

?#輸入郵箱Password:??????????

? #輸入新建的用戶密碼Password (again):????????????

#再次輸入

Superuser created successfully.??????????? #出現(xiàn)這個,表明創(chuàng)建成功




密碼不能喝用戶名和郵箱相似,8位以上

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

推薦閱讀更多精彩內(nèi)容

  • django——重寫用戶模型 Django內(nèi)建的User模型可能不適合某些類型的項目。例如,在某些網(wǎng)站上使用郵件地...
    常大鵬閱讀 26,371評論 2 29
  • User模型 User模型是這個框架的核心部分。他的完整的路徑是在django.contrib.auth.mode...
    yungege閱讀 210評論 1 1
  • 什么是 django自帶的admin系統(tǒng) Django 最強大的部分之一是自動生成的Admin 界面。它讀取模型數(shù)...
    Python野路子閱讀 4,881評論 1 50
  • 一、概要 auth模塊是Django提供的標(biāo)準(zhǔn)權(quán)限管理系統(tǒng),可以提供用戶身份認(rèn)證, 用戶組和權(quán)限管理。auth可以...
    唯老閱讀 1,681評論 0 7
  • 創(chuàng)建一個管理員用戶 python manage.py createsuperuser,按提示輸入用戶名、郵箱、密碼...
    LinearPi閱讀 829評論 0 0