35 lines
784 B
Python
35 lines
784 B
Python
from modules import locale
|
|
|
|
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
|
|
|
|
from flask import Flask
|
|
|
|
|
|
app = Flask(
|
|
__name__,
|
|
static_folder=None,
|
|
subdomain_matching=True,
|
|
template_folder="blueprints"
|
|
)
|
|
|
|
app.jinja_env.add_extension('pypugjs.ext.jinja.PyPugJSExtension')
|
|
|
|
app.before_request(locale.before_request)
|
|
app.context_processor(locale.inject_translations)
|
|
|
|
app.register_blueprint(root_bp)
|
|
app.register_blueprint(rdv_bp)
|
|
|
|
|
|
if app.debug:
|
|
blueprints.root.modules.style.compile_styles()
|
|
blueprints.risdeveau.modules.style.compile_styles()
|
|
|
|
app.config['SERVER_NAME'] = "localhost:5000"
|
|
else:
|
|
app.config['SERVER_NAME'] = "lair.moe"
|