Esempio n. 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
Esempio n. 2
0
File: views.py Progetto: g-k/standup
 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
Esempio n. 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))
Esempio n. 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)
Esempio n. 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)