diff --git a/flashcards/views.py b/flashcards/views.py index e5da7af..da4cbb6 100644 --- a/flashcards/views.py +++ b/flashcards/views.py @@ -41,7 +41,7 @@ class SectionViewSet(ReadOnlyModelViewSet): flashcards = Flashcard.cards_hidden_by(request.user) else: flashcards |= Flashcard.cards_hidden_by(request.user) - flashcards = flashcards.filter(section=self.get_object()).all() + flashcards = flashcards.filter(section=self.get_object()).order_by('material_date').all() return Response(FlashcardSerializer(flashcards, context={"user": request.user}, many=True).data) @detail_route(methods=['POST'])