Move model feature registration out of netbox.models.features #9636

Closed
opened 2025-12-29 21:20:07 +01:00 by adam · 2 comments
Owner

Originally created by @jeremystretch on GitHub (May 9, 2024).

Originally assigned to: @jeremystretch on GitHub.

Proposed Changes

Move the register_models() utility function out of netbox.models.features to a location TBD.

Justification

register_models() requires utilities.views.register_model_view(). This leads to a circular import when attempting to import netbox.models.features from within users.models because register_model_view() must ultimately resolve the User model (see PR #15976).

Originally created by @jeremystretch on GitHub (May 9, 2024). Originally assigned to: @jeremystretch on GitHub. ### Proposed Changes Move the `register_models()` utility function out of `netbox.models.features` to a location TBD. ### Justification `register_models()` requires `utilities.views.register_model_view()`. This leads to a circular import when attempting to import `netbox.models.features` from within `users.models` because `register_model_view()` must ultimately resolve the User model (see PR #15976).
adam added the status: acceptedtype: housekeepingnetbox labels 2025-12-29 21:20:07 +01:00
adam closed this issue 2025-12-29 21:20:08 +01:00
Author
Owner

@github-actions[bot] commented on GitHub (Aug 8, 2024):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.

@github-actions[bot] commented on GitHub (Aug 8, 2024): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. **Do not** attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
Author
Owner

@jeremystretch commented on GitHub (Aug 8, 2024):

We weren't able to get to this in time for v4.1 so I'll move it to the backlog.

@jeremystretch commented on GitHub (Aug 8, 2024): We weren't able to get to this in time for v4.1 so I'll move it to the backlog.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9636