correct theatre contents filter V00.05.09
authorcavaliet
Wed, 14 May 2014 18:25:54 +0200
changeset 86 ac44ba54cdeb
parent 85 43ec0b8a76ee
child 87 8fe7e2a5d336
correct theatre contents filter
src/spel/views.py
--- a/src/spel/views.py	Wed May 14 17:02:43 2014 +0200
+++ b/src/spel/views.py	Wed May 14 18:25:54 2014 +0200
@@ -61,7 +61,7 @@
     
     def get(self, request):
         # Filter content by date if necessary
-        content_qs = Content.objects.all()
+        content_qs = Content.objects.filter(tags__name__in=["content_theatre"])
         start_date_param = request.GET.get("start_date", "")
         if start_date_param!="":
             content_qs = content_qs.filter(content_creation_date__gt=start_date_param)
@@ -210,7 +210,7 @@
     def get(self, request):
         q = request.GET.get("q", "")
         page = 1
-        content_list = None
+        content_list = Content.objects.filter(tags__name__in=["content_theatre"])
         if q!="":
             field = "abstract"
             results, nb_contents, nb_segments = get_search_results(request, q, field, page, content_list)