Fork me on GitHub

Mutable Dict

Dict where key/value pairs can be added, deleted and sorted.

value = odict()
value['foo'] = 'Foo'
value['bar'] = 'Bar'
dict = factory('#field:dict', value=value, props={
    'label': 'Fill the dict',
    'required': 'At least one entry is required',
    'head': {
        'key': 'Key',
        'value': 'Value',
    },
})

Immutable Dict

Dict where only values can be edited.

value = odict()
value['baz'] = 'Baz'
value['bam'] = 'Bam'
dict = factory('#field:dict', value=value, props={
    'label': 'Modify the dict',
    'required': 'No Empty values allowed',
    'static': True,
    'head': {
        'key': 'Key',
        'value': 'Value',
    },
})
KeyValue