Пример #1
0
 def list(self, request, *args, **kw):
     '''Return list of applications with inputs and parameters.'''
     app_list = []
     for app_name, app in apps.items():
         app_list.append(serializers.ApplicationSerializer(app).data)
         app_list[-1]['name'] = app_name
     return Response(app_list)
Пример #2
0
 def list(self, request, *args, **kw):
     '''Return list of applications with inputs and parameters.'''
     app_list = []
     for app_id, app in apps.items():
         data = serializers.ApplicationSerializer(app).data
         app_list.append(data)
         data['id'] = app_id
         if app.get_self_descriptor():
             data['name'] = app.get_self_descriptor().name
             data['description'] = app.get_self_descriptor().description
     return Response(app_list)