Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closes #15042: Move model registration logic to AppConfigs #15203

Merged
merged 2 commits into from
Feb 21, 2024

Conversation

jeremystretch
Copy link
Member

Fixes: #15042

  • Move code from extras.utils.register_features() into netbox.models.features._register_features()
  • Rename netbox.models.features._register_features() to register_model()
  • Decouple model registration from the class_prepared signal
  • Call register_model() for each model under AppConfig.ready() for each app
  • Extend PluginConfig.ready() to also call register_model() for each model
  • Add a plugin test for model registration

@jeremystretch jeremystretch added this to the v4.0 milestone Feb 20, 2024
netbox/circuits/apps.py Outdated Show resolved Hide resolved
@jeremystretch jeremystretch merged commit 5f15979 into feature Feb 21, 2024
3 checks passed
@jeremystretch jeremystretch deleted the 15042-model-registration branch February 21, 2024 19:22
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants