diff --git a/seminar/viewsets.py b/seminar/viewsets.py index 67b13b3d..9d600375 100644 --- a/seminar/viewsets.py +++ b/seminar/viewsets.py @@ -93,4 +93,15 @@ class ProblemViewSet(viewsets.ModelViewSet): def get_queryset(self): queryset = m.Problem.objects.all() + ucel = self.request.query_params.get('ucel',None) + rocnik = self.request.query_params.get('rocnik',None) + tema = self.request.query_params.get('tema',None) + + if rocnik is not None: + queryset = queryset.filter(rocnik=rocnik) + + #if tema is not None: + + + return queryset diff --git a/vue_frontend/src/components/UlohaVzorakNode.vue b/vue_frontend/src/components/UlohaVzorakNode.vue index 753a5cef..35804198 100644 --- a/vue_frontend/src/components/UlohaVzorakNode.vue +++ b/vue_frontend/src/components/UlohaVzorakNode.vue @@ -1,7 +1,8 @@