Skip to content

Conversation

pheus
Copy link
Contributor

@pheus pheus commented Mar 23, 2025

Pull Request

Related Issue

Fixes: #253 [Housekeeping] Refactor View Registrations

New Behavior

  • Utilizes get_model_urls to reduce repetition in URL patterns and improve extensibility.

Contrast to Current Behavior

  • Replaces manual view registration with the @register_view decorator for consistency and maintainability.

Discussion: Benefits and Drawbacks

  • Simplifies plugin model view management by adopting the unified routing mechanism introduced in NetBox v4.2.
  • Improves code maintainability and reduces duplication.

Changes to the Documentation

None required (internal refactor with no impact on functionality).

Proposed Release Note Entry

None required (code cleanup only).

Double Check

  • I have explained my PR according to the information in the comments
    or in a linked issue.
  • My PR targets the dev branch.

Utilize `get_model_urls` to reduce repetition in URL patterns and
improve extensibility.
This refactor simplifies plugin model view management by unifying the
routing mechanism introduced in NetBox v4.2.

Fixes: netbox-community#253
@cruse1977 cruse1977 merged commit ff328ed into netbox-community:dev Apr 19, 2025
6 checks passed
@pheus pheus deleted the housekeeping/253-refactor-view-registrations branch April 19, 2025 21:33
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

Successfully merging this pull request may close these issues.

[Housekeeping]: Refactor View Registrations
2 participants