Extend register_model_view()
to handle list views
#18023
Labels
netbox
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
Proposed Changes
We currently use
register_model_view()
to register detail views (edit, delete, etc.) for models, which obviates the need to declare explicit URL paths for each. This could be extended to support list views as well. For example, a common set of views might look like this:The corresponding set of URL paths could then be reduced to:
(This could potentially be reduced even further, but I'm also wary of over-optimizing.)
get_model_urls()
will likewise need to be extended to differentiate between list and detail views.Justification
This will allow us to reduce a substantial amount of boilerplate URL patterns without any breaking changes (AFAICT).
The text was updated successfully, but these errors were encountered: