mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Documentation cleanup
This commit is contained in:
@@ -37,7 +37,7 @@ This class performs two crucial functions:
|
||||
1. Apply any fields, methods, and/or attributes necessary to the operation of these features
|
||||
2. Register the model with NetBox as utilizing these features
|
||||
|
||||
Simply subclass BaseModel when defining a model in your plugin:
|
||||
Simply subclass NetBoxModel when defining a model in your plugin:
|
||||
|
||||
```python
|
||||
# models.py
|
||||
@@ -54,7 +54,7 @@ class MyModel(NetBoxModel):
|
||||
!!! info
|
||||
This method was introduced in NetBox v3.3.
|
||||
|
||||
The `NetBoxModel` class includes a `clone()` method to be used for gathering attriubtes which can be used to create a "cloned" instance. This is used primarily for form initialization, e.g. when using the "clone" button in the NetBox UI. By default, this method will replicate any fields listed in the model's `clone_fields` list, if defined.
|
||||
The `NetBoxModel` class includes a `clone()` method to be used for gathering attributes which can be used to create a "cloned" instance. This is used primarily for form initialization, e.g. when using the "clone" button in the NetBox UI. By default, this method will replicate any fields listed in the model's `clone_fields` list, if defined.
|
||||
|
||||
Plugin models can leverage this method by defining `clone_fields` as a list of field names to be replicated, or override this method to replace or extend its content:
|
||||
|
||||
|
Reference in New Issue
Block a user