示例#1
0
 def items(self, text):
     ids = split(text)
     posts = Post.objects.filter(
         root__uid__in=ids).order_by('-creation_date')
     return posts[:FEED_COUNT]
示例#2
0
 def get_object(self, request, text):
     words = split(text)
     codes = [
         self.TYPE_MAP[word] for word in words if word in self.TYPE_MAP
     ]
     return codes, text
示例#3
0
 def get_object(self, request, text):
     elems = split(text)
     return ",".join(elems)
示例#4
0
 def get_object(self, request, text):
     elems = split(text)
     return elems
示例#5
0
 def items(self, text):
     ids = split(text)
     posts = Post.objects.valid_posts(
         author__profile__uid__in=ids).order_by('-creation_date')
     return posts[:FEED_COUNT]