diff --git a/docs/configuration/optional-settings.md b/docs/configuration/optional-settings.md index fcebf7af6..110ca9322 100644 --- a/docs/configuration/optional-settings.md +++ b/docs/configuration/optional-settings.md @@ -161,16 +161,16 @@ EXEMPT_VIEW_PERMISSIONS = ['*'] Default: Empty dictionary -Some static choice fields on models can be configured with custom values. This is done by defining `FIELD_CHOICES` as a dictionary mapping model fields to their choices list. Each choice in the list must have a database value and a human-friendly label, and may optionally specify a color. +Some static choice fields on models can be configured with custom values. This is done by defining `FIELD_CHOICES` as a dictionary mapping model fields to their choices list. Each choice in the list must have a database value and a human-friendly label, and may optionally specify a color. (A list of available colors is provided below.) For example, to specify a custom set of choices for the site status field: ```python FIELD_CHOICES = { 'dcim.Site.status': ( - ('foo', 'Foo'), - ('bar', 'Bar'), - ('baz', 'Baz'), + ('foo', 'Foo', 'red'), + ('bar', 'Bar', 'green'), + ('baz', 'Baz', 'blue'), ) } ``` @@ -190,6 +190,22 @@ The following model field support configurable choices: * `ipam.VLAN.status` * `virtualization.VirtualMachine.status` +The following colors are supported: + +* `blue` +* `indigo` +* `purple` +* `pink` +* `red` +* `orange` +* `yellow` +* `green` +* `teal` +* `cyan` +* `gray` +* `black` +* `white` + --- ## HTTP_PROXIES