netbox-community / netbox

The premier source of truth powering network automation. Open source under Apache 2. Try NetBox Cloud free: https://netboxlabs.com/free-netbox-cloud/
http://netboxlabs.com/oss/netbox/
Apache License 2.0
15.8k stars 2.54k forks source link

Move model feature registration out of `netbox.models.features` #16058

Open jeremystretch opened 4 months ago

jeremystretch commented 4 months ago

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).

github-actions[bot] commented 1 month ago

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.

jeremystretch commented 1 month ago

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