Example #1
0
 def put(self, request, slug_project, database_object_project, use_sandbox, id_settings_batch, format=None):
     item = Manager_Settings_Batch.get(id_settings_batch)
     serializer = Serializer_Settings_Batch(item, data=request.data, partial=True)
     if serializer.is_valid():
         serializer.save()
         return Response(serializer.data)
     return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
Example #2
0
 def get(self, request, slug_project, id_settings_batch):
     item = Manager_Settings_Batch.get(id_settings_batch)
     serializer = Serializer_Settings_Batch(item, context={'request': request})
     return Response(serializer.data)