2018-02-23 23:34:06 +01:00
|
|
|
import os
|
|
|
|
|
|
|
|
class Config(object):
|
|
|
|
SECRET_KEY = os.environ.get('SECRET_KEY') or 'a-random-secret-key'
|
|
|
|
SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or \
|
2019-02-02 17:34:41 +01:00
|
|
|
'postgresql+psycopg2://' + os.environ.get('USER') + ':@/pcv5'
|
2018-02-23 23:34:06 +01:00
|
|
|
SQLALCHEMY_TRACK_MODIFICATIONS = False
|
2019-02-03 15:00:37 +01:00
|
|
|
|
2019-02-03 15:40:37 +01:00
|
|
|
class V5Config(object):
|
2019-02-03 15:00:37 +01:00
|
|
|
# Length allocated to privilege names (slugs)
|
|
|
|
PRIVS_MAXLEN = 64
|
2019-02-04 16:41:29 +01:00
|
|
|
# Forbidden user names
|
|
|
|
FORBIDDEN_USERNAMES = [ "admin", "root", "webmaster", "contact" ]
|