diff --git a/flashcards/apps/api/v1/views.py b/flashcards/apps/api/v1/views.py index 17de3da..563b833 100644 --- a/flashcards/apps/api/v1/views.py +++ b/flashcards/apps/api/v1/views.py @@ -9,4 +9,4 @@ @require_http_methods(['GET']) def cards(request, course_id, block_id): cards = anki_from_block_id(course_id, block_id) - return Response("cards") + return Response(cards) diff --git a/flashcards/apps/cards/anki.py b/flashcards/apps/cards/anki.py index 6bc28b6..771da19 100644 --- a/flashcards/apps/cards/anki.py +++ b/flashcards/apps/cards/anki.py @@ -45,4 +45,5 @@ def anki_from_block_id(course_id, block_id): csv_maybe = cards_from_block_id(course_id, block_id) result = csv_maybe.replace('\t', '') create_anki_cards(result) + return csv_maybe # return the CSV text so we can see it in testing