untrack pyrom_config.toml, provide example with default values instead

This commit is contained in:
2025-12-05 14:16:11 +03:00
parent 508b313871
commit 7840399d01
3 changed files with 12 additions and 2 deletions

1
.gitignore vendored
View File

@@ -6,5 +6,6 @@ data/static/avatars/*
!data/static/avatars/default.webp
config/secrets.prod.env
config/pyrom_config.toml
.local/

View File

@@ -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")

View File

@@ -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,