diff --git a/unisportomat/quiz/models.py b/unisportomat/quiz/models.py index 5a4db07a69178961c70d85c826cd2875063b4511..2a0fd62cb9551de542f1b972aabdf57f524b8288 100644 --- a/unisportomat/quiz/models.py +++ b/unisportomat/quiz/models.py @@ -6,7 +6,7 @@ from django.db import models def validate_rating(value): """ - TODO: Validations are only run when using Model Forms. + TODO: Validations are only run when using Model Forms. Maybe do that, if there is time. """ if not ((10 >= value >= 1) or value == -1): @@ -133,6 +133,7 @@ class Criterion(models.Model): def get_active_sum(self): """ Get Number of Sports with Rating larger than 1 and the cumulated sum of all ratings + TODO: Think about Usefulness of Rating Sums with 1 as Min Value """ num_active = 0 diff --git a/unisportomat/quiz/serializers.py b/unisportomat/quiz/serializers.py index 8cb9246f796efa675ac4d2feb7064e317d521ee9..54df09459ae6a392dfa0b929d0f808f354fa2a45 100644 --- a/unisportomat/quiz/serializers.py +++ b/unisportomat/quiz/serializers.py @@ -99,6 +99,7 @@ class SingleSportSerializer(serializers.BaseSerializer): During this process, the Data is Validated on whether the Rating Value and Criterion ID are valid. If the Request is PATCHing or PUTting an existing Sport, not every field must be existant. So, the existance is explicitly checked. + TODO: Different Functions based on PUT or PATCH? """ sport_dictionary = {} diff --git a/unisportomat/quiz/views.py b/unisportomat/quiz/views.py index 61514311cf64081e888a1e5f49df2e1d77a4d4c7..ca418f78b7a0f6854756ee97b4f4181cf6d1b9fa 100644 --- a/unisportomat/quiz/views.py +++ b/unisportomat/quiz/views.py @@ -135,7 +135,7 @@ class SmallSportListView(viewsets.ViewSet): """ PUT for api/admin/sport/<id>/ Creates a Sport if it doesn't exist, otherwise overwrites it. - TODO + TODO: Maybe Rework PUT if needed of Admin Frontend """ # Get Data from Serializer @@ -221,6 +221,7 @@ class IncompleteSportView(APIView): """ GET for api/admin/sport/incomplete/ Returns every incomplete Sport with its incomplete Ratings + TODO: Maybe Pagination """ incomplete_sport_list = [] @@ -249,6 +250,7 @@ class CriteriaView(APIView): Returns every Criterium and the Metadata of Number of Sports in which the Rating is >1 and the cumulated sum of Ratings >1 + TODO: Also Pagination """ data = []