1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Rename PrimaryModel to NetBoxModel

This commit is contained in:
jeremystretch
2022-01-26 20:57:14 -05:00
parent a795b95f7e
commit c5650bb278
20 changed files with 66 additions and 64 deletions

View File

@ -65,9 +65,10 @@ Simply subclass BaseModel when defining a model in your plugin:
```python
# models.py
from netbox.models import BaseModel
from django.db import models
from netbox.models import NetBoxModel
class MyModel(BaseModel):
class MyModel(NetBoxModel):
foo = models.CharField()
...
```
@ -78,7 +79,7 @@ If you prefer instead to enable only a subset of these features for a plugin mod
```python
# models.py
from django.db.models import models
from django.db import models
from netbox.models.features import ExportTemplatesMixin, TagsMixin
class MyModel(ExportTemplatesMixin, TagsMixin, models.Model):