104 | | {{{ |
105 | | settings.cap.identifier_prefix = "prefix" # string |
106 | | settings.cap.identifier_suffix = "suffix" # string |
107 | | settings.cap.codes = [...] # key-value pairs |
108 | | settings.cap.parameters = [...] # key-value pairs |
109 | | settings.cap.geocodes = [...] # key-value pairs |
110 | | settings.cap.base64 = False # boolean |
111 | | settings.cap.languages = OrderedDict([ |
112 | | ("en-US", "English"), |
113 | | ("fr", "Français") |
114 | | ...]) |
115 | | settings.cap.priorities = OrderedDict([ |
116 | | ("<value>, "<Translated title>", <urgency>, <severity>, <certainty>, <color>), |
117 | | ... |
118 | | ]) |
119 | | |
120 | | }}} |
121 | | |
122 | | Key-value pairs above are python lists containing many dictionaries detailing the behavior and parameters for the key-value pair. |
123 | | It should take the following form |
124 | | |
125 | | {{{ |
126 | | kvpairs = [ |
127 | | dict(key="<key>", value="<value>", comment="<help text>", immutable=<immutable>, options=[("<value>", "<Value title>"), ...]), |
128 | | ... |
129 | | ] |
130 | | |
131 | | }}} |
132 | | |
133 | | * Here the comment and options dictionary values are optional. |
134 | | * The options argument is a list of ("<value>", "<value title>") pairs and provides a drop-down to pick the value for the key from. |
135 | | * The mutable argument is a bit-map saying whether to lock the key field or the value field or both in the key-value user interface. (by locking we mean disabling.) You can use it like so: |
136 | | {{{ |
137 | | KEY_MUTABLE = 1 |
138 | | VALUE_MUTABLE = 2 |
139 | | |
140 | | immutable = KEY_IMMUTABLE # only key is immutable |
141 | | immutable = VALUE_IMMUTABLE # only value is immutable |
142 | | immutable = KEY_IMMUTABLE | VALUE_MUTABLE # both immutable |
143 | | immutable = 0 # both immutable |
144 | | }}} |