from __future__ import absolute_import

from ds.models import App

from .base import Serializer
from .manager import add


@add(App)
class AppSerializer(Serializer):
    def serialize(self, item, attrs):
        return {
            'id': str(item.id),
            'name': item.name,
        }

from __future__ import absolute_import

from ds.models import App

from .base import Serializer
from .manager import add


@add(App)
class AppSerializer(Serializer):
    def serialize(self, item, attrs):
        return {
            'id': str(item.id),
            'name': item.name,
            'provider': item.provider,
            'provider_config': item.provider_config,
        }

Add provider information to App
Add provider information to App

  from __future__ import absolute_import
  
  from ds.models import App
  
  from .base import Serializer
  from .manager import add
  
  
  @add(App)
  class AppSerializer(Serializer):
      def serialize(self, item, attrs):
          return {
              'id': str(item.id),
              'name': item.name,
+             'provider': item.provider,
+             'provider_config': item.provider_config,
          }
  
Add provider information to App
## Code Before:
from __future__ import absolute_import

from ds.models import App

from .base import Serializer
from .manager import add


@add(App)
class AppSerializer(Serializer):
    def serialize(self, item, attrs):
        return {
            'id': str(item.id),
            'name': item.name,
        }

## Instruction:
Add provider information to App
## Code After:
from __future__ import absolute_import

from ds.models import App

from .base import Serializer
from .manager import add


@add(App)
class AppSerializer(Serializer):
    def serialize(self, item, attrs):
        return {
            'id': str(item.id),
            'name': item.name,
            'provider': item.provider,
            'provider_config': item.provider_config,
        }
