mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
PEP fixes
This commit is contained in:
parent
40a18d0ce4
commit
887250cd06
@ -6,11 +6,13 @@ import os
|
||||
|
||||
fn = 'secret_key.txt'
|
||||
|
||||
|
||||
def generate_key():
|
||||
options = string.digits + string.ascii_letters + string.punctuation
|
||||
key = ''.join([random.choice(options) for i in range(50)])
|
||||
return key
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
# Ensure key file is placed in same directory as this script
|
||||
@ -19,4 +21,4 @@ if __name__ == '__main__':
|
||||
|
||||
with open(key_file, 'w') as kf:
|
||||
kf.write(generate_key())
|
||||
print('Generated SECRET_KEY to {f}'.format(f=key_file))
|
||||
print('Generated SECRET_KEY to {f}'.format(f=key_file))
|
||||
|
Loading…
Reference in New Issue
Block a user