Files
lair.moe/app.py
T

35 lines
784 B
Python
Raw Normal View History

2026-01-17 21:36:49 +03:00
from modules import locale
2026-01-17 18:55:25 +03:00
from blueprints.root import bp as root_bp
from blueprints.risdeveau import bp as rdv_bp
import blueprints.root.modules.style
import blueprints.risdeveau.modules.style
2026-01-17 21:36:49 +03:00
from flask import Flask
2025-08-09 02:28:03 +03:00
2026-03-31 16:09:57 +03:00
app = Flask(
__name__,
static_folder=None,
subdomain_matching=True,
template_folder="blueprints"
)
app.jinja_env.add_extension('pypugjs.ext.jinja.PyPugJSExtension')
2025-08-09 02:28:03 +03:00
2026-01-17 21:36:49 +03:00
app.before_request(locale.before_request)
app.context_processor(locale.inject_translations)
2025-07-03 01:37:41 +03:00
2026-01-17 18:55:25 +03:00
app.register_blueprint(root_bp)
app.register_blueprint(rdv_bp)
2025-08-07 21:16:47 +03:00
2025-08-09 02:28:03 +03:00
2025-08-07 21:16:47 +03:00
if app.debug:
2026-01-17 18:55:25 +03:00
blueprints.root.modules.style.compile_styles()
blueprints.risdeveau.modules.style.compile_styles()
2025-09-05 13:57:52 +03:00
2026-01-17 18:55:25 +03:00
app.config['SERVER_NAME'] = "localhost:5000"
else:
app.config['SERVER_NAME'] = "lair.moe"