📜  创建 django 用户命令行 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:18.788000             🧑  作者: Mango

代码示例2
from django.contrib.auth.models import User
user = User.objects.create_user(value['USERNAME'], value['EMAIL'], value['PASSWORD'])
user.first_name = value['NAME']
user.last_name = value['SURNAME']
user.save()