python +pycharm + django 当中连接本地的sqlite,不知道本地admin的用户名密码问题解决

本文详细介绍如何在PyCharm中使用Django框架创建超级用户。通过在命令行输入createsuperuser命令,按照提示设置用户名、邮箱及密码,即可完成超级用户的创建。随后,可通过指定的URL地址和登录凭据访问Django的后台管理界面。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1、如下图所示,打开pycharm当中的tools当中的
在这里插入图片描述
2、由此便可进入操作该数据库的命令行了
在terminal命令行当中输入createsuperuser
由此按照步骤进行一步步操作,完成相关密码录入等工作,如下图所示
在这里插入图片描述
该图中代码如下所示

manage.py@DjangoCeshi > createsuperuser
"D:\pychram profession\PyCharm 2018.2.4\bin\runnerw.exe" F:\python\DjangoCeshi\venv\Scripts\python.exe "D:\pychram profession\PyCharm 2018.2.4\helpers\pycharm\django_manage.py" createsuperuser F:/python/DjangoCeshi
Tracking file by folder pattern:  migrations
Username (leave blank to use 'administrator'):  admin
Email address:  admin@qq.com
Warning: Password input may be echoed.
Password:  admin
Warning: Password input may be echoed.
Password (again):  admin
Bypass password validation and create user anyway? [y/N]: The password is too similar to the email address.
This password is too short. It must contain at least 8 characters.
This password is too common.
 
Warning: Password input may be echoed.
Password:  admin123456
Warning: Password input may be echoed.
Password (again):  admin123456

3、由此,再重新输入相关用户名密码就可以登录进去了
http://127.0.0.1:8000/admin/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值