Skip to content

Commit

Permalink
init: move blueprint registration to ext
Browse files Browse the repository at this point in the history
  • Loading branch information
kpsherva committed Mar 20, 2024
1 parent ca523ae commit d08333c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion invenio_pages/ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ def register_pages(app):
app.view_functions["invenio_pages.view"] = view

for page in Page.query.all():
add_url_rule(page.url)
if not page.has_custom_view: # Skip registration of pages with custom view
add_url_rule(page.url)


def view():
Expand Down

0 comments on commit d08333c

Please sign in to comment.