allow filtering on contents title
authorymh <ymh.work@gmail.com>
Mon, 26 Nov 2012 16:05:14 +0100
changeset 970 caa3a2695cb7
parent 969 ac241ce310fd
child 971 74fa7a05d912
allow filtering on contents title
src/ldt/ldt/api/ldt/resources/content.py
--- a/src/ldt/ldt/api/ldt/resources/content.py	Sat Nov 24 15:16:00 2012 +0100
+++ b/src/ldt/ldt/api/ldt/resources/content.py	Mon Nov 26 16:05:14 2012 +0100
@@ -1,6 +1,6 @@
 from django.conf.urls.defaults import url
 from ldt.ldt_utils.models import Content, Media
-from tastypie.resources import Bundle, ModelResource, ALL_WITH_RELATIONS
+from tastypie.resources import Bundle, ModelResource, ALL_WITH_RELATIONS, ALL
 from tastypie import fields
 from ldt.indexation import get_results_list
 from itertools import groupby
@@ -29,6 +29,7 @@
         queryset = Content.objects.select_related('front_project').all()
         filtering = {
             'tags' : ALL_WITH_RELATIONS,
+            'title' : ALL,
         }
     
     def get_object_list(self, request):