diff --git a/config.py.example b/config.py.example index eb145f3453d7e9197bb940a2c1b0d6130aae34eb..81862a504bab49b94015d0a03ca7d2a277aec8cc 100644 --- a/config.py.example +++ b/config.py.example @@ -1,6 +1,7 @@ # Defaults for development ,do not use in production! DEBUG = True VIDEOPREFIX = 'https://videoag.fsmpi.rwth-aachen.de' +#SECRET_KEY = 'something random' DB_SCHEMA = 'db_schema.sql' DB_DATA = 'db_example.sql' diff --git a/server.py b/server.py index 0a3637c6db4e029e99d9ebbb1013e2bcab80cbdd..ceccf646e0cae541e75c0d0e9d7c81ec374aa919 100755 --- a/server.py +++ b/server.py @@ -31,6 +31,8 @@ if not sys.argv[0].endswith('run.py'): config.from_pyfile('config.py', silent=True) if config['DEBUG']: app.jinja_env.auto_reload = True +if not config.get('SECRET_KEY', None): + config['SECRET_KEY'] = os.urandom(24) from db import query, searchquery, ldapauth, ldapget, convert_timestamp