Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace view_func with default_view_func to make APP_RDM_USER_DASHBOARD_ROUTES overwriteable #2831

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions invenio_app_rdm/users_ui/views/ui.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# -*- coding: utf-8 -*-

Check failure on line 1 in invenio_app_rdm/users_ui/views/ui.py

View workflow job for this annotation

GitHub Actions / Python / Tests (3.9, postgresql14, opensearch2)

isort-check from flask import Blueprint, current_app, render_template from flask_login import current_user +from invenio_app_rdm.theme.views import create_url_rule + from ..searchapp import search_app_context from .dashboard import communities, requests, uploads -from invenio_app_rdm.theme.views import create_url_rule #

Check failure on line 1 in invenio_app_rdm/users_ui/views/ui.py

View workflow job for this annotation

GitHub Actions / Python / Tests (3.12, postgresql14, opensearch2)

isort-check from flask import Blueprint, current_app, render_template from flask_login import current_user +from invenio_app_rdm.theme.views import create_url_rule + from ..searchapp import search_app_context from .dashboard import communities, requests, uploads -from invenio_app_rdm.theme.views import create_url_rule #
#
# This file is part of Invenio.
# Copyright (C) 2016-2021 CERN.
Expand All @@ -14,6 +14,7 @@

from ..searchapp import search_app_context
from .dashboard import communities, requests, uploads
from invenio_app_rdm.theme.views import create_url_rule


#
Expand Down Expand Up @@ -47,19 +48,25 @@
)

blueprint.add_url_rule(
routes["uploads"],
view_func=uploads,
**create_url_rule(
routes["uploads"],
default_view_func=uploads,
)
)

# Settings tab routes
blueprint.add_url_rule(
routes["communities"],
view_func=communities,
**create_url_rule(
routes["communities"],
default_view_func=communities,
)
)

blueprint.add_url_rule(
routes["requests"],
view_func=requests,
**create_url_rule(
routes["requests"],
default_view_func=requests,
)
)

# Register context processor
Expand Down
Loading