Exemple #1
0
 def get(self):
     '''List all discussions related to my organizations.'''
     q = filter_parser.parse_args().get('q')
     discussions = discussions_for(current_user._get_current_object())
     discussions = discussions.order_by('-created')
     if q:
         discussions = discussions.filter(title__icontains=q.decode('utf-8'))
     return list(discussions)
Exemple #2
0
 def get(self):
     '''List all discussions related to my organizations.'''
     q = filter_parser.parse_args().get('q')
     discussions = discussions_for(current_user._get_current_object())
     discussions = discussions.order_by('-created')
     if q:
         decoded = q
         discussions = discussions.filter(title__icontains=decoded)
     return list(discussions)