mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Closes #8794: Support dynamic configuration for JournalEntry kinds
This commit is contained in:
@ -161,13 +161,16 @@ class StatusChoices(ChoiceSet):
|
||||
STATUS_BAR = 'bar'
|
||||
STATUS_BAZ = 'baz'
|
||||
|
||||
CHOICES = (
|
||||
CHOICES = [
|
||||
(STATUS_FOO, 'Foo', 'red'),
|
||||
(STATUS_BAR, 'Bar', 'green'),
|
||||
(STATUS_BAZ, 'Baz', 'blue'),
|
||||
)
|
||||
]
|
||||
```
|
||||
|
||||
!!! warning
|
||||
For dynamic configuration to work properly, `CHOICES` must be a mutable list, rather than a tuple.
|
||||
|
||||
```python
|
||||
# models.py
|
||||
from django.db import models
|
||||
|
Reference in New Issue
Block a user