django 관리자 계정 암호 재설정하기 Python

python manage.py shell

then use following script in shell

from django.contrib.auth.models
import UserUser.objects.filter(is_superuser=True)

will list you all super users on the system. if you recognize yur username from the list:

usr = User.objects.get(username='your username')
usr.set_password('raw password')
usr.save()

덧글

댓글 입력 영역