-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I had to add
value = value == '||' and [] or value[1:-1].split("|")
to make it working properly with existing data rows:
class MultipleOptionsWidget2(OptionsWidget):
@staticmethod
def widget(field, value, size=5, **attributes):
value = value == '||' and [] or value[1:-1].split("|")
attributes.update(dict(_size=size, _multiple=True))
return OptionsWidget.widget(field, value, **attributes)
Values in the widget were not preselected before the change.
David
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkyzWF0ACgkQ3oCkkciamVGVHgCfej3grFLiXXi6F2zG7UkEqgxY
GpoAnjv7DRcks7zgJ8lxYCP8G19qww76
=cj+E
-----END PGP SIGNATURE-----