Example #1
0
 def _format_multi_list(self, multis, viewer, expand_srs):
     templ = LabeledMultiJsonTemplate(expand_srs)
     resp = [
         templ.render(multi).finalize() for multi in multis
         if multi.can_view(viewer)
     ]
     return self.api_wrapper(resp)
Example #2
0
 def _format_multi_list(self, multis, viewer, expand_srs):
     templ = LabeledMultiJsonTemplate(expand_srs)
     resp = [templ.render(multi).finalize() for multi in multis
             if multi.can_view(viewer)]
     return self.api_wrapper(resp)
Example #3
0
 def GET_my_multis(self, expand_srs):
     """Fetch a list of multis belonging to the current user."""
     multis = LabeledMulti.by_owner(c.user)
     templ = LabeledMultiJsonTemplate(expand_srs)
     resp = [templ.render(multi).finalize() for multi in multis]
     return self.api_wrapper(resp)