diff --git a/unisportomat/quiz/views.py b/unisportomat/quiz/views.py index a670d0998de87c39af0837e8f0f069d5c232e0bb..51ff4f84d88552fe745e9e45e081c695cbc5e224 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 @@ -311,7 +310,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() @@ -455,5 +458,4 @@ class ScraperView(APIView): sport.save() - # TODO: Maybe Redirect? return Response(status=200)