mirror of
https://github.com/netbox-community/netbox.git
synced 2025-09-06 14:23:36 -06:00
Correct import path for register_model_feature()
This commit is contained in:
parent
a9a97ebec1
commit
f09fa4a2c2
@ -124,7 +124,7 @@ For more information about database migrations, see the [Django documentation](h
|
|||||||
|
|
||||||
## Custom Model Features
|
## Custom Model Features
|
||||||
|
|
||||||
In addition to utilizing the model features provided natively by NetBox (listed above), plugins can register their own model features. This is done using the `register_model_feature()` function from `netbox.models.features`. This function takes two arguments: a feature name, and a callable which accepts a model class. The callable must return a boolean value indicting whether the given model supports the named feature.
|
In addition to utilizing the model features provided natively by NetBox (listed above), plugins can register their own model features. This is done using the `register_model_feature()` function from `netbox.utils`. This function takes two arguments: a feature name, and a callable which accepts a model class. The callable must return a boolean value indicting whether the given model supports the named feature.
|
||||||
|
|
||||||
This function can be used as a decorator:
|
This function can be used as a decorator:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user