Skip to content
Snippets Groups Projects
Commit d2b289de authored by borzechof99's avatar borzechof99 :whale2:
Browse files

Add Todos at various points

parent 4bd78e89
No related branches found
No related tags found
No related merge requests found
...@@ -6,7 +6,7 @@ from django.db import models ...@@ -6,7 +6,7 @@ from django.db import models
def validate_rating(value): 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): if not ((10 >= value >= 1) or value == -1):
...@@ -133,6 +133,7 @@ class Criterion(models.Model): ...@@ -133,6 +133,7 @@ class Criterion(models.Model):
def get_active_sum(self): def get_active_sum(self):
""" """
Get Number of Sports with Rating larger than 1 and the cumulated sum of all ratings 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 num_active = 0
......
...@@ -99,6 +99,7 @@ class SingleSportSerializer(serializers.BaseSerializer): ...@@ -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. 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. If the Request is PATCHing or PUTting an existing Sport, not every field must be existant.
So, the existance is explicitly checked. So, the existance is explicitly checked.
TODO: Different Functions based on PUT or PATCH?
""" """
sport_dictionary = {} sport_dictionary = {}
......
...@@ -135,7 +135,7 @@ class SmallSportListView(viewsets.ViewSet): ...@@ -135,7 +135,7 @@ class SmallSportListView(viewsets.ViewSet):
""" """
PUT for api/admin/sport/<id>/ PUT for api/admin/sport/<id>/
Creates a Sport if it doesn't exist, otherwise overwrites it. 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 # Get Data from Serializer
...@@ -221,6 +221,7 @@ class IncompleteSportView(APIView): ...@@ -221,6 +221,7 @@ class IncompleteSportView(APIView):
""" """
GET for api/admin/sport/incomplete/ GET for api/admin/sport/incomplete/
Returns every incomplete Sport with its incomplete Ratings Returns every incomplete Sport with its incomplete Ratings
TODO: Maybe Pagination
""" """
incomplete_sport_list = [] incomplete_sport_list = []
...@@ -249,6 +250,7 @@ class CriteriaView(APIView): ...@@ -249,6 +250,7 @@ class CriteriaView(APIView):
Returns every Criterium and the Metadata of Returns every Criterium and the Metadata of
Number of Sports in which the Rating is >1 Number of Sports in which the Rating is >1
and the cumulated sum of Ratings >1 and the cumulated sum of Ratings >1
TODO: Also Pagination
""" """
data = [] data = []
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment