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

Closes #18023: Employ register_model_view() for list views #18029

Merged
merged 15 commits into from
Nov 20, 2024

Conversation

jeremystretch
Copy link
Member

@jeremystretch jeremystretch commented Nov 15, 2024

Closes: #18023

  • Extend register_model_view() and get_model_urls() to support list views
  • Register list views using register_model_view() as we do currently for detail views
  • Remove static URL paths for list views

@jeremystretch jeremystretch marked this pull request as ready for review November 20, 2024 19:11
@jeremystretch jeremystretch added this to the v4.2 milestone Nov 20, 2024
@@ -1,89 +1,39 @@
from django.urls import include, path

from utilities.urls import get_model_urls
from . import views
from . import views # noqa F401
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do feel like these ought to be avoided, if just because they make things less clear.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, but we need to import the views somehow. If not here, we could do it under the ready() method for each app.

@jeremystretch jeremystretch merged commit a0b4b0a into feature Nov 20, 2024
6 checks passed
@jeremystretch jeremystretch deleted the 18023-model-list-view-registration branch November 20, 2024 20:54
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants