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

Urls registered under same endpoint name #61

Open
jrcastro2 opened this issue Jan 12, 2023 · 1 comment
Open

Urls registered under same endpoint name #61

jrcastro2 opened this issue Jan 12, 2023 · 1 comment
Assignees

Comments

@jrcastro2
Copy link
Contributor

Comment/shelve: Since we are still in setup mode at this point, isn't it possible to use current_app.add_url_rule here like before? I suspect it's because of this check. Which is a valid check in the sense that if you did url_for("invenio_pages.view"), you would probably get a random URL back?

In any case, I think the best would be to have unique human-friendly endpoint names for each page rule and point them all to the invenio_pages.views.view function. But this unique key is not currently part of the Page model, so that would mean opening a can of worms and updating the alembic recipes, etc.

The above also means that there's no way to do something like url_for("about_page") to get the URL for a page.

So maybe we just open an issue and revisit in the future to add this as a feature.

Originally posted by @slint in #60 (comment)

@ntarocco
Copy link
Contributor

ntarocco commented Mar 21, 2024

Decision:

  • invenio-pages should not register any dynamic URLs/route
  • invenio-pages should provide a helper to render a page, given a URL
  • Overlays should declare blueprints that will render each specific page
  • Provide documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants