Skip to content
Snippets Groups Projects
Commit e3868b24 authored by Jan Hartig's avatar Jan Hartig
Browse files

Check localisations before importing routes

parent 49ef71d5
Branches
No related tags found
1 merge request!4Merge new features and fixes
Pipeline #25815 passed
......@@ -18,18 +18,16 @@ def create_app():
with open("localisations.toml", "rb") as file:
localisations = tomllib.load(file)
for language in app.config["ENABLED_LOCALISATIONS"]:
check_localisation(app.logger, localisations, language)
app.config["LOCALISATIONS"] = localisations
del localisations
app.logger.info("Localisations loaded.")
with app.app_context():
import routes
for language in app.config["ENABLED_LOCALISATIONS"]:
check_localisation(app.logger, app.config["LOCALISATIONS"], language)
del language
app.logger.info("Localisations loaded.")
return app
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment