mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Closes #9887: Inspect docs_url property to determine link to model documentation
This commit is contained in:
@ -49,6 +49,12 @@ class MyModel(NetBoxModel):
|
||||
...
|
||||
```
|
||||
|
||||
### NetBoxModel Properties
|
||||
|
||||
#### `docs_url`
|
||||
|
||||
This attribute specifies the URL at which the documentation for this model can be reached. By default, it will return `/static/docs/models/<app_label>/<model_name>/`. Plugin models can override this to return a custom URL. For example, you might direct the user to your plugin's documentation hosted on [ReadTheDocs](https://readthedocs.org/).
|
||||
|
||||
### Enabling Features Individually
|
||||
|
||||
If you prefer instead to enable only a subset of these features for a plugin model, NetBox provides a discrete "mix-in" class for each feature. You can subclass each of these individually when defining your model. (Your model will also need to inherit from Django's built-in `Model` class.)
|
||||
|
Reference in New Issue
Block a user