Skip to content

Should use "ordering" in model Meta, not order_by in Serializer Relations example [documentation] #2782

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

Merged
merged 1 commit into from
Apr 1, 2015

Conversation

caffodian
Copy link
Contributor

This is just a really minor documentation fix - in the example models for Serializer Relations, the Tracks model should be using ordering. order_by is an invalid Meta attribute and will result in the following

TypeError: 'class Meta' got invalid attribute(s): order_by

This felt a bit silly to PR, but I did actually get briefly tripped up by it in an end of day moment... so yea ;)

kevin-brown added a commit that referenced this pull request Apr 1, 2015
Should use "ordering" in model Meta, not order_by in Serializer Relations example [documentation]
@kevin-brown kevin-brown merged commit ad8de23 into encode:master Apr 1, 2015
@kevin-brown
Copy link
Member

I have a feeling we referenced order_by because that's what django-filter uses, but Django does use ordering.

Thanks for the pull request.

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.

2 participants