Prechádzať zdrojové kódy

Update documentation for FIELD_CHOICES

jeremystretch 4 rokov pred
rodič
commit
b60ace80be
1 zmenil súbory, kde vykonal 20 pridanie a 4 odobranie
  1. 20 4
      docs/configuration/optional-settings.md

+ 20 - 4
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