mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 03:56:43 +00:00
PEP fixes
This commit is contained in:
parent
40a18d0ce4
commit
887250cd06
@ -6,11 +6,13 @@ import os
|
|||||||
|
|
||||||
fn = 'secret_key.txt'
|
fn = 'secret_key.txt'
|
||||||
|
|
||||||
|
|
||||||
def generate_key():
|
def generate_key():
|
||||||
options = string.digits + string.ascii_letters + string.punctuation
|
options = string.digits + string.ascii_letters + string.punctuation
|
||||||
key = ''.join([random.choice(options) for i in range(50)])
|
key = ''.join([random.choice(options) for i in range(50)])
|
||||||
return key
|
return key
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
||||||
# Ensure key file is placed in same directory as this script
|
# 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:
|
with open(key_file, 'w') as kf:
|
||||||
kf.write(generate_key())
|
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…
x
Reference in New Issue
Block a user