mirror of
https://github.com/Cian-H/am-d-model.eu.git
synced 2025-12-22 21:41:57 +00:00
Another menu plugin fix attempt
This commit is contained in:
@@ -8,9 +8,17 @@ def init_app(app):
|
|||||||
@app.route("/amdmodel")
|
@app.route("/amdmodel")
|
||||||
def redirect_to_amdmodel():
|
def redirect_to_amdmodel():
|
||||||
"""Redirect to the AM-D-Model website."""
|
"""Redirect to the AM-D-Model website."""
|
||||||
rd = redirect("https://am-d-model.eu")
|
return redirect("https://am-d-model.eu")
|
||||||
|
|
||||||
|
def register_menu_items():
|
||||||
with app.app_context():
|
with app.app_context():
|
||||||
rd = current_menu.register(".main.amdmodel", "About AM-D-Model")(rd)
|
menu_item = current_menu.submenu(".main.amdmodel")
|
||||||
return rd
|
menu_item.register(
|
||||||
|
endpoint='redirect_to_amdmodel',
|
||||||
|
text='About AM-D-Model'
|
||||||
|
)
|
||||||
|
|
||||||
|
with app.app_context():
|
||||||
|
register_menu_items()
|
||||||
|
|
||||||
return app
|
return app
|
||||||
|
|||||||
Reference in New Issue
Block a user