Skip to content

Commit

Permalink
Merge pull request #67 from altf4arnold/API-pagination
Browse files Browse the repository at this point in the history
[FIX] ordering per TLD on the API
  • Loading branch information
altf4arnold authored May 25, 2024
2 parents 6715261 + e923ed9 commit 1ea1438
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tldtester/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ class Meta:


class TLDViewSet(viewsets.ModelViewSet):
queryset = TLD.objects.all().order_by('-tld')
queryset = TLD.objects.all()
serializer_class = TLDSerializer
http_method_names = ['get', 'head']

def get_queryset(self):
queryset = TLD.objects.all()
queryset = TLD.objects.all().order_by('tld')
query_params = self.request.query_params.copy()

# Remove 'format' from query_params
Expand Down

0 comments on commit 1ea1438

Please sign in to comment.