config: generate secret key using python
parent
0007a057a3
commit
0dacb730a9
@ -1,7 +1,8 @@
|
|||||||
import os
|
import os, random, string
|
||||||
import subprocess
|
|
||||||
|
|
||||||
class Config:
|
class Config:
|
||||||
SECRET_KEY = os.environ.get('SECRET_KEY') or subprocess.check_output(['pwgen', '20', '1'])
|
SECRET_KEY = os.environ.get('SECRET_KEY') or \
|
||||||
|
''.join(random.choices(string.ascii_letters, k=20))
|
||||||
DATA_DIR = os.environ.get('DATA_DIR') or '/home/orange/devel/prolefeeder/tmp'
|
DATA_DIR = os.environ.get('DATA_DIR') or '/home/orange/devel/prolefeeder/tmp'
|
||||||
MAX_LENGTH = os.environ.get('MAX_LENGTH') or 180
|
MAX_LENGTH = os.environ.get('MAX_LENGTH') or 180
|
||||||
|
Loading…
Reference in New Issue