コード例 #1
0
ファイル: handlers.py プロジェクト: alexa-infra/cassad
 def read(self, request, tag):
     from_value = request.GET.get('from', None)
     show_number = request.GET.get('num', 30)
     if tag == 'deleted':
         res_list = Picture.ranged(Q(tags__in=[tag]), from_value, show_number, "-creation")
     else:
         res_list = Picture.ranged(Q(tags__in=[tag]) & Q(tags__nin=["deleted"]), from_value, show_number, "-creation")
     return SerializedObject(res_list).to_python()
コード例 #2
0
ファイル: handlers.py プロジェクト: alexa-infra/cassad
 def read(self, request):
     from_value = request.GET.get('from', None)
     show_number = request.GET.get('num', 30)
     res_list = Picture.ranged(Q(tags__size=0) | Q(tags__exists=False), from_value, show_number, "-creation")
     return SerializedObject(res_list, fields=self.fields).to_python()