mirror of
https://github.com/Cian-H/am-d-model.eu.git
synced 2025-12-22 21:41:57 +00:00
Attempt to fix plugin by adding args and refactor
This commit is contained in:
@@ -1,10 +1,15 @@
|
|||||||
from flask import Blueprint
|
from flask import Blueprint
|
||||||
|
|
||||||
|
blueprint = Blueprint(
|
||||||
|
"custom_menu",
|
||||||
|
__name__,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def init_app(app):
|
def init_app(app):
|
||||||
"""Initialize application."""
|
"""Initialize application."""
|
||||||
app.register_blueprint(views.blueprint)
|
app.register_blueprint(blueprint)
|
||||||
return app
|
|
||||||
|
|
||||||
|
|
||||||
from . import views
|
from . import views
|
||||||
|
|
||||||
|
return app
|
||||||
|
|||||||
@@ -10,9 +10,8 @@ blueprint = Blueprint(
|
|||||||
@blueprint.before_app_first_request
|
@blueprint.before_app_first_request
|
||||||
def init_menu():
|
def init_menu():
|
||||||
"""Add custom items to main menu."""
|
"""Add custom items to main menu."""
|
||||||
main_menu = current_menu
|
current_menu.submenu("main").register(
|
||||||
|
"amdmodel",
|
||||||
main_menu.submenu("main").register(
|
|
||||||
text="About AM-D-Model",
|
text="About AM-D-Model",
|
||||||
external_url="https://am-d-model.eu",
|
external_url="https://am-d-model.eu",
|
||||||
order=0,
|
order=0,
|
||||||
|
|||||||
Reference in New Issue
Block a user