Django-virtual-models

Latest version: v0.2.0

Safety actively analyzes 623490 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

0.2.0

- 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.
- Add parameter `serializer_context` to be used in `v.Annotation` and `get_prefetch_queryset`.

0.1.6

- Fix support for custom manager in `VirtualModel` initialization
- Separate method for `_build_prefetch` to allow overrides

0.1.5

- More robust `is_preloaded` check
- Add Django 4.2 to tests.

0.1.4

Add Python 3.11 to tests.

0.1.3

- README update.

0.1.2

- Avoid redundant `to_attr` when nesting Virtual Models
- Refactor `fields.py` to use `self.parent` and `self.field_name`
- Simplify docs and tests by not using manager param

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.