Example #1
0
 def set_wrapped(self, url, wrapped):
     from r2.lib.pages.things import wrap_things
     if not isinstance(wrapped, Wrapped):
         wrapped = wrap_things(wrapped)[0]
     self.data[url] = wrapped.render_nocache('api').finalize()
 def set_wrapped(self, url, wrapped):
     from r2.lib.pages.things import wrap_things
     if not isinstance(wrapped, Wrapped):
         wrapped = wrap_things(wrapped)[0]
     self.data[url] = wrapped.render_nocache('api').finalize()
Example #3
0
 def GET_my_multis(self):
     """Fetch a list of multis belonging to the current user."""
     multis = LabeledMulti.by_owner(c.user)
     wrapped = wrap_things(*multis)
     resp = [w.render() for w in wrapped]
     return self.api_wrapper(resp)
Example #4
0
 def _format_multi(self, multi):
     resp = wrap_things(multi)[0].render()
     return self.api_wrapper(resp)
Example #5
0
 def _format_multi(self, multi):
     resp = wrap_things(multi)[0].render()
     return self.api_wrapper(resp)
Example #6
0
 def GET_my_multis(self):
     """Fetch a list of multis belonging to the current user."""
     multis = LabeledMulti.by_owner(c.user)
     wrapped = wrap_things(*multis)
     resp = [w.render() for w in wrapped]
     return self.api_wrapper(resp)