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.
- Added support for overriding field kwargs for autogenerated serializer fields via
out
mechanism (#99).
- Added support for Django's reverse generic relations (
GenericRelation
model field) (#93).
- Add support for Django 5.0
- Fix an error when using the
@out
decorator on producer functions that return values like booleans, that can't have arbitrary attributes added to them (#86).
- Add support for Django 4.2
- Drop support for Python 3.7
- Correctly set the allow_null attribute on nested serializers (#81)
- Add support for Django 4.1
- Drop support for Django 2.2
- Add support for Python 3.11
- Drop support for Python 3.6
- In the Django REST framework layer, callables in a spec are now automatically called and passed the
request
object (#76) - Support for generating a Django REST framework serializer from a spec, and for annotating custom pairs in a spec with their output field types. This enables automatic schema generation. (#76)
- BACKWARDS INCOMPATIBLE: The default value of the
distinct
argument for thepairs.count
andpairs.has
functions has changed fromTrue
toFalse
. This now matches the default value of thedistinct
arguments to Django'sCount
annotation. To retain current behaviour, adddistinct=True
to all calls to these two functions in your codebase. For background on this decision, see this discussion.
- Proper documentation! https://www.django-readers.org
- New
pairs.annotate
function allowing you to annotate a queryset with aggregates, functions etc and produce the result. - New
pairs.sum
function to annotate a queryset with theSum
aggregate function and produce the result.
- New
pairs.discard_queryset_function
andpairs.discard_projector
functions to discard one or other item in a reader pair.
SpecMixin
now applies prepare function inget_queryset
, notfilter_queryset
Initial stable release.