django修改admin密碼

python manage.py shellpython

而後獲取你的用戶名,而且重設密碼:
from django.contrib.auth.models import User 
user = User.objects.get(username='admin')
user.set_password('new_password')
user.save()shell

相關文章
相關標籤/搜索