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.
- Add support to nested prefetch lookups like
v.VirtualModel(manager=User.objects, lookup="course__facilitators")
- Warning: this will remain undocumented for now, because the behavior is strange:
the prefetch is made inside
course
in this case, due to Django behavior.
- Warning: this will remain undocumented for now, because the behavior is strange:
the prefetch is made inside
- Add parameter
serializer_context
to be used inv.Annotation
andget_prefetch_queryset
.
- Fix support for custom manager in
VirtualModel
initialization - Separate method for
_build_prefetch
to allow overrides.
- More robust
is_preloaded
check - Add Django 4.2 to tests.
- Add Python 3.11 to tests.
- README update.
- Avoid redundant
to_attr
when nesting Virtual Models - Refactor
fields.py
to useself.parent
andself.field_name
- Simplify docs and tests by not using manager param
- Handle additional case for related primary key field.
- Change the hints API from
prefetch.Required
tohints.Virtual
.
- Fix documentation link on PyPI.
- First release.