Update quickstart.md

add .order_by() to eliminate Pagination UnorderedObjectListWarning
This commit is contained in:
Matt George 2023-12-09 05:51:37 -05:00 committed by GitHub
parent 0f39e0124d
commit 18c4ecde33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -105,7 +105,7 @@ Right, we'd better write some views then. Open `tutorial/quickstart/views.py` a
"""
API endpoint that allows groups to be viewed or edited.
"""
queryset = Group.objects.all()
queryset = Group.objects.all().order_by('name')
serializer_class = GroupSerializer
permission_classes = [permissions.IsAuthenticated]