All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Note that in line with Django REST Framework policy, any parts of the framework not mentioned in the documentation should generally be considered private API, and may be subject to change.
- Add support for Django 2.1, DRF 3.9 and Python 3.7. Please note:
- Django >= 2.1 is not supported with Python < 3.5.
- Pass context from
PolymorphicModelSerializer
to child serializers to support fields which require arequest
context such asurl
. - Avoid patch on
RelationshipView
deleting relationship instance when constraint would allow null (#242) - Avoid error with related urls when retrieving relationship which is referenced as
ForeignKey
on parent - Do not render
write_only
relations - Do not skip empty one-to-one relationships
- Allow
HyperlinkRelatedField
to be used with related urls
- Add testing configuration to
REST_FRAMEWORK
configuration as described in DRF - Add
HyperlinkedRelatedField
andSerializerMethodHyperlinkedRelatedField
. See usage docs - Add related urls support. See usage docs
- Add optional jsonapi-style filter backends. See usage docs
- Deprecate
MultipleIDMixin
because it doesn't comply with the JSON:API 1.0 spec. Replace it withDjangoFilterBackend
and change clients to usefilter[id.in]
query parameter instead ofids[]
. See usage docs. You also have the option to copy the mixin into your code.
- Replaced binary
drf_example
sqlite3 db with a fixture. See getting started. - Replaced unmaintained API doc with auto-generated API reference.
- Performance improvement when rendering relationships with
ModelSerializer
- Do not show deprecation warning when user has implemented custom pagination class overwriting default values.
- Add new pagination classes based on JSON:API query parameter recommendations:
JsonApiPageNumberPagination
andJsonApiLimitOffsetPagination
. See usage docs.
- Add
ReadOnlyModelViewSet
extension with prefetch mixins - Add support for Django REST Framework 3.8.x
- Introduce
JSON_API_FORMAT_FIELD_NAMES
option replacingJSON_API_FORMAT_KEYS
but in comparison preserving values from being formatted as attributes can contain any json value. - Allow overwriting of
get_queryset()
in customResourceRelatedField
- Deprecate
PageNumberPagination
andLimitOffsetPagination
. UseJsonApiPageNumberPagination
andJsonApiLimitOffsetPagination
instead.- To retain deprecated values for
PageNumberPagination
andLimitOffsetPagination
create new custom class like the following in your code base:
and adjustclass CustomPageNumberPagination(PageNumberPagination): page_query_param = "page" page_size_query_param = "page_size" class CustomLimitOffsetPagination(LimitOffsetPagination): max_limit = None
REST_FRAMEWORK['DEFAULT_PAGINATION_CLASS']
setting accordingly. - To retain deprecated values for
- Deprecate
JSON_API_FORMAT_KEYS
, useJSON_API_FORMAT_FIELD_NAMES
.
- Performance improvement when rendering included data
- Add support for Django REST Framework 3.7.x.
- Add support for Django 2.0.
- Drop support for Django 1.8 - 1.10 (EOL)
- Drop support for Django REST Framework < 3.6.3 (3.6.3 is the first to support Django 1.11)
- Drop support for Python 3.3 (EOL)
- Add support for polymorphic models
- Add nested included serializer support for remapped relations
- Enforcing flake8 linting
- When
JSON_API_FORMAT_KEYS
is False (the default) do not translate request attributes and relations to snake_case format. This conversion was unexpected and there was no way to turn it off. - Fix for apps that don't use
django.contrib.contenttypes
. - Fix
resource_name
support for POST requests and nested serializers
- Add support for Django REST Framework 3.5 and 3.6
- Add support for Django 1.11
- Add support for Python 3.6
- Allow default DRF serializers to operate even when mixed with DRF-JA serializers
- Avoid setting
id
toNone
in the parser simply because it's missing - Fix out of scope
relation_instance
variable in renderer - Fix wrong resource type for reverse foreign keys
- Fix documentation typos
- Parse
meta
in JSONParser - Add code coverage reporting and updated Django versions tested against
- Add support for regular non-ModelSerializers
- Documented built in
url
field for generating aself
link in thelinks
key - Convert
include
field names back to snake_case - Raise a
ParseError
if anid
is not included in a PATCH request
- Fix Django 1.10 compatibility
- Performance enhancements to reduce the number of queries in related payloads
- Fix issue where related
SerializerMethodRelatedField
fields were not included even if ininclude
- Fix bug that prevented
fields = ()
in a serializer from being valid - Fix stale data returned in PATCH to-one relation
- Fixes naming error that caused ModelSerializer relationships to fail
- Add
get_related_field_name
for views subclassing RelationshipView to override - Added LimitOffsetPagination
- Support deeply nested
?includes=foo.bar.baz
without returning intermediate models (bar) - Allow a view's serializer_class to be fetched at runtime via
get_serializer_class
- Added support for
get_root_meta
on list serializers
- Exception handler can now easily be used on DRF-JA views alongside regular DRF views
- Rename
JSON_API_FORMAT_RELATION_KEYS
toJSON_API_FORMAT_TYPES
to match what it was actually doing - Rename
JSON_API_PLURALIZE_RELATION_TYPE
toJSON_API_PLURALIZE_TYPES
- Documented ResourceRelatedField and RelationshipView
- Fixes bug where write_only fields still had their keys rendered