Attempt to fix plugin by adding args and refactor

This commit is contained in:
2025-05-08 11:02:42 +01:00
parent f055eb78f1
commit 47e98eb111
2 changed files with 11 additions and 7 deletions

View File

@@ -1,10 +1,15 @@
from flask import Blueprint
blueprint = Blueprint(
"custom_menu",
__name__,
)
def init_app(app):
"""Initialize application."""
app.register_blueprint(views.blueprint)
app.register_blueprint(blueprint)
from . import views
return app
from . import views

View File

@@ -10,9 +10,8 @@ blueprint = Blueprint(
@blueprint.before_app_first_request
def init_menu():
"""Add custom items to main menu."""
main_menu = current_menu
main_menu.submenu("main").register(
current_menu.submenu("main").register(
"amdmodel",
text="About AM-D-Model",
external_url="https://am-d-model.eu",
order=0,