1from django.contrib.auth.models import User
2
3password = User.objects.make_random_password()
4user.set_password(password)
5user.save()
1BaseUserManager().make_random_password() # by deafult its generate 10 charactor password
2'aYMX5Wk7Cu'
3
4# Source
5https://stackoverflow.com/questions/9480641/django-password-generator