1
0
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:
jeremystretch
2022-03-21 16:35:24 -04:00
parent 48dc76a694
commit ca44a654a5
3 changed files with 9 additions and 4 deletions

View File

@ -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