estebistec / drf-compound-fields

Django-REST-framework serializer fields for compound types.
BSD 3-Clause "New" or "Revised" License
92 stars 12 forks source link

Add list-or-item field #5

Closed estebistec closed 10 years ago

estebistec commented 10 years ago

Create a simple field type, building upon ListField, that allows values to be either lists or individual items of the embedded field-type.

E.g., ListOrItem(CharFIeld) would validate and serialize either 'a' or ['a', 'b', 'c'].

estebistec commented 10 years ago

Implemented in #11. Closing.