Skip to content

Commit

Permalink
Merge pull request #35 from mohi7solanki/patch-1
Browse files Browse the repository at this point in the history
Use MAX_OBJECTS instead.
  • Loading branch information
shabda committed Sep 19, 2018
2 parents d3a26db + 3330a57 commit 67926b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/apis-without-drf.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ We will now write the :code:`polls_list` and :code:`polls_detail`
def polls_list(request):
MAX_OBJECTS = 20
polls = Poll.objects.all()[:20]
polls = Poll.objects.all()[:MAX_OBJECTS]
data = {"results": list(polls.values("question", "created_by__username", "pub_date"))}
return JsonResponse(data)
Expand Down

0 comments on commit 67926b7

Please sign in to comment.