Rust Programming

Django has builtin method make_random_password for generating random passwords. It accepts two optional arguments length and allowed characters and returns a random password with the given length and given string of allowed characters.

Default length: 10 Default allowed characters: abcdefghjkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ23456789 default value of allowed_chars doesn’t contain letters that can cause user confusion, including: * i, l, I, and 1 (lowercase letter i, lowercase letter L, uppercase letter i, and the number one) * o, O, and 0 (lowercase letter o, uppercase letter o, and zero)

from django.contrib.auth.models import User

password = User.objects.make_random_password() # 7Gjk2kd4T9

password = User.objects.make_random_password(length=14) # FTELhrNFdRbSgy

passwrod = User.objects.make_random_password(length=14, allowed_chars="abcdefghjkmnpqrstuvwxyz01234567889") # zvk0hawf8m6394