- Added
EnforceValidationFieldMixin.capture_failed_field
,FormSerializerFieldMixin.capture_failed_field
, andFormSerializerBase.capture_failed_fields
to capture the optional fields that failed.
- Fixing invalid data being copied over in
FormSerializer
when fail mode is notfail
- Fixing
DoubleAsStrJsonEncoder
by subclassing from DRF which supports datetimes, etc
- Fixing
SwappingSerializerMixin
by supportingListSerializer
- Added
SwappingSerializerMixin
. Allows to declaratively swap fields any field instances in child serializers. - Added
DoubleAsStrJsonEncoder
for handicapped API clients.
- Fixed how choices are normalized in
SerializerForm
to[(key, key)]
vs previously[(key, value)]
to match DRF's handling of choices unlike Django forms. - Added support for
Form.all_fields
andForm.all_base_fields
inSerializerForm
which supports custom form classes which implement such API. - Added support for
FormSerializer.Meta.exclude
which allows to specify fields to exclude.
- Added
rounding
parameter toRoundedDecimalField
which allows to define rounding direction when rounding value.
- Fixed bugs in
RoundedDecimalField
- Added
RoundedDecimalField
for rounding off decimal to specifieddecimal_places
instead of validing that higher precision is not allowed - Added
URLField
for automatic mapping between django forms and DRF serializers
- Fixed a bug in
SerializerForm
in which form cleaned data was replaced with serializer data instead of updating it.
- Fixed a bug in
EnforceValidationFieldMixin
that it was overwritingto_internal_value
instead ofrun_validation
- Test coverage is now at 100%!
- Fixed bugs in
AllowBlankNullFieldMixin
- All DRF fields not subclass both
AllowBlankNullFieldMixin
andEmptyStringFieldMixin
- Added custom
to_representation()
toEmptyStringFieldMixin
which allows to pass empty string orNone
values. This is especially useful for fields likeIntegerField
which would blow up when passing empty string value for non-required fields.
- Fixed a bug in
FormSerializer
which did not honorfield_mapping
in any of the subclasses
- First release on PyPI.