Beispiel #1
0
 def get_status_queryset(self):
     obs = Status.objects.all()
     query = self.request.GET.get('query')
     if query:
         obs = obs.filter(generate_query('content', query))
     return obs
Beispiel #2
0
 def get_status_queryset(self):
     obs = Status.objects.all()
     query = self.request.GET.get('query')
     if query:
         obs = obs.filter(generate_query('content', query))
     return obs
Beispiel #3
0
    def get_status_queryset(self):
        query = self.request.GET.get('query')
        if not query:
            return []

        return Status.objects.filter(generate_query('content', query))
Beispiel #4
0
 def test_basic(self, field, text, expected):
     # NOTE(willkg): We repr the Q objects because otherwise they don't compare. I think this is
     # ok since I think it's order-dependent.
     assert repr(generate_query(field, text)) == repr(expected)
Beispiel #5
0
 def test_edge_cases(self, field, text, expected):
     # NOTE(willkg): We repr the Q objects because otherwise they don't compare. I think this is
     # ok since I think it's order-dependent.
     assert repr(generate_query(field, text)) == repr(expected)