Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed missing "fields" meta argument in docs #8243

Merged
merged 2 commits into from
Dec 17, 2021

Conversation

Guilouf
Copy link
Contributor

@Guilouf Guilouf commented Nov 9, 2021

In "Specifying fields explicitly" https://github.com/encode/django-rest-framework/blob/master/docs/api-guide/serializers.md#specifying-fields-explicitly paragraph from the docs, the code example provided was missing the fields meta argument, which is mandatory from 3.3.0.
The assertion error was: Creating a ModelSerializer without either the 'fields' attribute or the 'exclude' attribute has been deprecated since 3.3.0, and is now disallowed. Add an explicit fields = '__all__' to the CalendarTaskSerializer serializer.

@Guilouf Guilouf requested a review from tomchristie November 9, 2021 17:04
@Guilouf Guilouf requested a review from kevin-brown December 14, 2021 11:41
@tomchristie tomchristie merged commit 45082b3 into encode:master Dec 17, 2021
sigvef pushed a commit to sigvef/django-rest-framework that referenced this pull request Dec 3, 2022
* Fixed missing "fields" meta argument in docs, leading to an assertion error

* Update docs/api-guide/serializers.md

Co-authored-by: Tom Christie <[email protected]>

Co-authored-by: Tom Christie <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants