django auth_user表插入用户

python manage.py shell

from django.contrib.auth.hashers import make_password

# 生成哈希密码
hashed_password = make_password('123456')
print(hashed_password)


INSERT INTO auth_user (password, last_login, is_superuser, username, first_name, last_name, email, is_staff, is_active, date_joined)
VALUES ('pbkdf2_sha256$390000$LW5hskj1MXc0yhGpwbi3tK$PGbL0a+6srRdoUB8vxu/N7Ni8w1Z/jSTtboaIuKEma0=', NULL, 0, 'whq123', 'First', 'Last', 'email@example.com', 0, 1, '2024-06-03 00:00:00');

posted @ 2024-06-03 17:10  强仔必胜  阅读(9)  评论(0编辑  收藏  举报