mirror of
https://github.com/Cian-H/am-d-model.eu.git
synced 2025-12-22 13:41:56 +00:00
Attempt to fix menu plugin
This commit is contained in:
@@ -1,13 +1,16 @@
|
|||||||
from flask import redirect
|
from flask import redirect
|
||||||
|
from flask_menu import current_menu
|
||||||
|
|
||||||
|
|
||||||
def init_app(app):
|
def init_app(app):
|
||||||
"""Initialize application."""
|
"""Initialize application."""
|
||||||
|
|
||||||
@app.route("/amdmodel")
|
@app.route("/amdmodel")
|
||||||
@app.extensions["menu"].root().register(".main.amdmodel", "About AM-D-Model")
|
|
||||||
def redirect_to_amdmodel():
|
def redirect_to_amdmodel():
|
||||||
"""Redirect to the AM-D-Model website."""
|
"""Redirect to the AM-D-Model website."""
|
||||||
return redirect("https://am-d-model.eu")
|
rd = redirect("https://am-d-model.eu")
|
||||||
|
with app.app_context():
|
||||||
|
rd = current_menu.register(".main.amdmodel", "About AM-D-Model")(rd)
|
||||||
|
return rd
|
||||||
|
|
||||||
return app
|
return app
|
||||||
|
|||||||
Reference in New Issue
Block a user