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

Enable dynamic queryset resolution for generic views #10739

Closed
jeremystretch opened this issue Oct 25, 2022 · 0 comments
Closed

Enable dynamic queryset resolution for generic views #10739

jeremystretch opened this issue Oct 25, 2022 · 0 comments
Assignees
Labels
status: accepted This issue has been accepted for implementation topic: plugins Relates to the plugins framework type: feature Introduction of new functionality to the application
Milestone

Comments

@jeremystretch
Copy link
Member

NetBox version

v3.3.5

Feature type

New functionality

Proposed functionality

Add a get_queryset() method to the base generic views to support dynamic resolution of a view's queryset. This method will accept a request parameter to enable responding to different request conditions and parameters, similar to Django's own generic views.

This method will be called by all views to determine the queryset. To maintain backward compatibility, this method will by default simply return the queryset class attribute.

Use case

This change enables the execution of custom logic based on the incoming request when determining the starting queryset for a review.

Database changes

No response

External dependencies

No response

@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application topic: plugins Relates to the plugins framework labels Oct 25, 2022
@jeremystretch jeremystretch added this to the v3.4 milestone Oct 25, 2022
@jeremystretch jeremystretch self-assigned this Oct 25, 2022
jeremystretch added a commit that referenced this issue Dec 12, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation topic: plugins Relates to the plugins framework type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

1 participant