from core.models import Identity
from rest_framework import serializers
from ..summaries import QuotaSummarySerializer, AllocationSummarySerializer, UserSummarySerializer

class IdentitySerializer(serializers.HyperlinkedModelSerializer):
    quota = QuotaSummarySerializer(source='get_quota')
    allocation = AllocationSummarySerializer(source='get_allocation')
    user = UserSummarySerializer(source='created_by')

    class Meta:
        model = Identity
        view_name = 'api_v2:identity-detail'
        fields = ('id', 'url', 'quota', 'allocation', 'user')

@@ -163,16 +163,49 @@
 rializer
+, %5C%0A    ProviderSummarySerializer
 %0A%0Aclass 
@@ -442,16 +442,59 @@
 ted_by')
+%0A    provider = ProviderSummarySerializer()
 %0A%0A    cl
@@ -626,16 +626,28 @@
 cation',
+ 'provider',
  'user')

add provider to identity detail serializer