diff --git a/categories/views.py b/categories/views.py index e975457..e83be2d 100644 --- a/categories/views.py +++ b/categories/views.py @@ -16,5 +16,5 @@ class CategoryModelViewSet(viewsets.ModelViewSet): def category(request, category_name): context = {} context['name'] = category_name - context['tests'] = Test.objects.filter(category=category_name) + context['tests'] = Test.objects.filter(category=category_name, invisible=False) return render(request, 'category.html', context) \ No newline at end of file diff --git a/config/views.py b/config/views.py index aa730a6..209b7f3 100644 --- a/config/views.py +++ b/config/views.py @@ -9,7 +9,8 @@ def home(request): context = {} # TODO replace #context['tests'] = Test.objects.filter(owner=request.user) - context['tests'] = Test.objects.all + #context['tests'] = Test.objects.all + context['tests'] = Test.objects.filter(invisible=False) return render(request, 'home.html', context) diff --git a/templates/createTest.html b/templates/createTest.html index a9d0ac3..e412bd7 100644 --- a/templates/createTest.html +++ b/templates/createTest.html @@ -11,6 +11,10 @@

+ + +
+