Exemple #1
0
 def get_data(self):
     try:
         resources = guts_api.resources_list(self.request)
     except Exception:
         resources = []
         exceptions.handle(
             self.request, _("Unable to fetch resources")
         )
     return resources
Exemple #2
0
    def get(self, request):
        """Get a list of resource

        """
        result = guts_api.resources_list(request)
        return {'items': [u.to_dict() for u in result]}