mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-25 19:14:03 +03:00
Removed single and double quotes from punctuation used in random key
This commit is contained in:
parent
44f67452a9
commit
67873552b0
|
@ -35,9 +35,10 @@ def get_random_string(length=50):
|
||||||
The default length of 12 with the a-z, A-Z, 0-9 character set returns
|
The default length of 12 with the a-z, A-Z, 0-9 character set returns
|
||||||
a 71-bit value. log_2((26+26+10)^12) =~ 71 bits
|
a 71-bit value. log_2((26+26+10)^12) =~ 71 bits
|
||||||
"""
|
"""
|
||||||
|
punctuation = string.punctuation.replace('"', '').replace("'", '')
|
||||||
if using_sysrandom:
|
if using_sysrandom:
|
||||||
return ''.join(random.choice(
|
return ''.join(random.choice(
|
||||||
string.digits + string.ascii_letters + string.punctuation
|
string.digits + string.ascii_letters + punctuation
|
||||||
) for i in range(length))
|
) for i in range(length))
|
||||||
|
|
||||||
print(
|
print(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user