diff -ur Django-0.96/django/contrib/auth/models.py Django-0.96-new/django/contrib/auth/models.py
old
|
new
|
|
79 | 79 | "Generates a random password with the given length and given allowed_chars" |
80 | 80 | # Note that default value of allowed_chars does not have "I" or letters |
81 | 81 | # that look like it -- just to avoid confusion. |
82 | | from random import choice |
83 | | return ''.join([choice(allowed_chars) for i in range(length)]) |
| 82 | import random |
| 83 | return ''.join(random.sample(allowed_chars, length)) |
84 | 84 | |
85 | 85 | class User(models.Model): |
86 | 86 | """Users within the Django authentication system are represented by this model. |