The user may wish to provide a dynamic queryset on a `RelatedField` based on the `context`. The way to do that is to create a subclass of `RelatedField` (or a child) and override the `get_queryset` method. However, this is undocumented, and instantiating that field without a `queryset` argument (because it's not needed) will raise an assertion error. Document `.get_queryset(self)` as an official part of the API of `RelatedField`, and don't enforce the use of `queryset` when `get_queryset` is overridden.
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
authentication.md | Loading commit data... | |
content-negotiation.md | Loading commit data... | |
exceptions.md | Loading commit data... | |
fields.md | Loading commit data... | |
filtering.md | Loading commit data... | |
format-suffixes.md | Loading commit data... | |
generic-views.md | Loading commit data... | |
metadata.md | Loading commit data... | |
pagination.md | Loading commit data... | |
parsers.md | Loading commit data... | |
permissions.md | Loading commit data... | |
relations.md | Loading commit data... | |
renderers.md | Loading commit data... | |
requests.md | Loading commit data... | |
responses.md | Loading commit data... | |
reverse.md | Loading commit data... | |
routers.md | Loading commit data... | |
serializers.md | Loading commit data... | |
settings.md | Loading commit data... | |
status-codes.md | Loading commit data... | |
testing.md | Loading commit data... | |
throttling.md | Loading commit data... | |
validators.md | Loading commit data... | |
versioning.md | Loading commit data... | |
views.md | Loading commit data... | |
viewsets.md | Loading commit data... |