1. 创建管理员用户
python manage.py createsuperuser
2. 创建普通用户
python manage.py shell
from django.contrib.auth.models import User
user = User.objects.create_user(username='John',password='123456')
user.save()
1. 创建管理员用户
python manage.py createsuperuser
2. 创建普通用户
python manage.py shell
from django.contrib.auth.models import User
user = User.objects.create_user(username='John',password='123456')
user.save()