untrack pyrom_config.toml, provide example with default values instead
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -6,5 +6,6 @@ data/static/avatars/*
|
||||
!data/static/avatars/default.webp
|
||||
|
||||
config/secrets.prod.env
|
||||
config/pyrom_config.toml
|
||||
|
||||
.local/
|
||||
|
||||
@@ -101,7 +101,16 @@ def reparse_babycode():
|
||||
|
||||
def create_app():
|
||||
app = Flask(__name__)
|
||||
app.config.from_file('../config/pyrom_config.toml', load=tomllib.load, text=False)
|
||||
try:
|
||||
app.config.from_file('../config/pyrom_config.toml', load=tomllib.load, text=False)
|
||||
except FileNotFoundError:
|
||||
print('No configuration file found, loading defaults.')
|
||||
app.config['SITE_NAME'] = 'Pyrom'
|
||||
app.config['DISABLE_SIGNUP'] = False
|
||||
app.config['MODS_CAN_INVITE'] = True
|
||||
app.config['USERS_CAN_INVITE'] = False
|
||||
app.config['ADMIN_CONTACT_INFO'] = ''
|
||||
app.config['GUIDE_DESCRIPTION'] = ''
|
||||
|
||||
if os.getenv("PYROM_PROD") is None:
|
||||
app.static_folder = os.path.join(os.path.dirname(__file__), "../data/static")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
SITE_NAME = "Porom"
|
||||
SITE_NAME = "Pyrom"
|
||||
DISABLE_SIGNUP = false # if true, no one can sign up.
|
||||
|
||||
# if neither of the following two options is true,
|
||||
Reference in New Issue
Block a user