Skip to content

Commit

Permalink
init: move breadcrumb into finalize_app
Browse files Browse the repository at this point in the history
  • Loading branch information
utnapischtim committed May 13, 2023
1 parent d1e08cd commit 5f01692
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
10 changes: 10 additions & 0 deletions invenio_userprofiles/finalize_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
def finalize_app(app):
"""Finalize app."""
init_menu()
init_breadcrumb()


def init_menu():
Expand All @@ -30,3 +31,12 @@ def init_menu():
),
order=0,
)


def init_breadcrumb():
"""Init breadcrumb."""
item = current_menu.submenu("breadcrumbs.settings.profile")
item.register(
"invenio_userprofiles.profile",
_("Profile"),
)
1 change: 0 additions & 1 deletion invenio_userprofiles/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ def userprofile(value):

@blueprint.route("/", methods=["GET", "POST"])
@login_required
@register_breadcrumb(blueprint, "breadcrumbs.settings.profile", _("Profile"))
def profile():
"""View for editing a profile."""
# Create forms
Expand Down

0 comments on commit 5f01692

Please sign in to comment.