diff --git a/unisportomat/quiz/views.py b/unisportomat/quiz/views.py index 510b64dbe44875c42fd51800d67a0564f9a701f5..29bc2fc2903981ba6b1c7d067817fa55c651c949 100644 --- a/unisportomat/quiz/views.py +++ b/unisportomat/quiz/views.py @@ -2,14 +2,13 @@ Defines the views for the API """ -# from django.shortcuts import render +import copy from rest_framework import viewsets from rest_framework.views import APIView from rest_framework.response import Response from django.shortcuts import get_object_or_404 from django.http import HttpResponse from .pagination import PageNumberWithPageSizePagination -import copy from .course_scraper.course_scraper import scraping @@ -313,7 +312,11 @@ class ScraperView(APIView): View for the Scraper, including GET and POST """ - def get(self, request): + def get(self, request): # pylint: disable=too-many-locals + """ + Scrapes the Sports currently on the default website, + and sends a diff of the current sports and the scraped ones + """ # Scrape Sports from their website scraped_sports = scraping() @@ -457,5 +460,4 @@ class ScraperView(APIView): sport.save() - # TODO: Maybe Redirect? return Response(status=200)