Add configurable donation options

This commit is contained in:
rob
2026-09-29 13:11:19 -03:00
parent 2e38c5d629
commit 16be1c8d92
5 changed files with 244 additions and 3 deletions
+2
View File
@@ -29,6 +29,7 @@ from cmdforge.registry import app as registry_app
from . import web_bp
from .auth import login, register, logout
from .donations import load_donation_options
from .filters import register_filters
from .forum import forum_bp
from .sessions import SQLiteSessionInterface, cleanup_expired_sessions
@@ -48,6 +49,7 @@ def create_web_app() -> Flask:
app.config["SESSION_COOKIE_NAME"] = "cmdforge_session"
app.config["SESSION_COOKIE_SECURE"] = os.environ.get("CMDFORGE_ENV") == "production"
app.config["SHOW_ADS"] = os.environ.get("CMDFORGE_SHOW_ADS", "").lower() == "true"
app.config["DONATION_OPTIONS"] = load_donation_options(os.environ)
# CSRF token generator
app.config["CSRF_GENERATOR"] = lambda: secrets.token_urlsafe(32)