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

Deprecate support for registering a PluginTemplateExtension subclass via model (singular) #17029

Closed
jeremystretch opened this issue Jul 30, 2024 · 0 comments
Assignees
Labels
status: accepted This issue has been accepted for implementation type: deprecation Removal of existing functionality or behavior
Milestone

Comments

@jeremystretch
Copy link
Member

Proposed Changes

Deprecate support for the singular model attribute on PluginTemplateExtension. Subclasses will need to update accordingly:

Old

class MyExtension(PluginTemplateExtension):
    model = 'dcim.site'

New

class MyExtension(PluginTemplateExtension):
    models = ['dcim.site']

Justification

NetBox v4.1 introduced support for registering on one or more models via the new models (plural) attribute, which obsoleted the singular form.

Impact

PluginTemplateExtension subclasses which continue to register using the model attribute will generate a deprecation warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: accepted This issue has been accepted for implementation type: deprecation Removal of existing functionality or behavior
Projects
None yet
Development

No branches or pull requests

1 participant