Skip to content

Enable dynamic queryset resolution for generic views #10739

Closed
@jeremystretch

Description

@jeremystretch

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

Metadata

Metadata

Assignees

Labels

status: acceptedThis issue has been accepted for implementationtopic: pluginsRelates to the plugins frameworktype: featureIntroduction of new functionality to the application

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions