from core.models import ApplicationVersion as ImageVersion
from rest_framework import serializers
from api.v2.serializers.summaries import LicenseSerializer
from api.v2.serializers.summaries import ImageVersionSummarySerializer
from api.v2.serializers.fields import ProviderMachineRelatedField


class ImageVersionSerializer(serializers.HyperlinkedModelSerializer):

    """
    Serializer for ApplicationVersion (aka 'image_version')
    """
    # NOTE: Implicitly included via 'fields'
    # id, application
    parent = ImageVersionSummarySerializer()
    #name, change_log, allow_imaging
    licenses = LicenseSerializer(many=True, read_only=True)  # NEW
    membership = serializers.SlugRelatedField(
        slug_field='name',
        read_only=True,
        many=True)  # NEW
    machines = ProviderMachineRelatedField(many=True)
    start_date = serializers.DateTimeField()
    end_date = serializers.DateTimeField()

    class Meta:
        model = ImageVersion
        view_name = 'api:v2:providermachine-detail'
        fields = ('id', 'parent', 'name', 'change_log',
                  'machines', 'allow_imaging',
                  'licenses', 'membership',
                  'start_date', 'end_date')

@@ -132,16 +132,26 @@
  import 
+(%0A        
 LicenseS
@@ -163,49 +163,83 @@
 izer
-%0Afrom api.v2.serializers.summaries import
+,%0A        UserSummarySerializer,%0A        IdentitySummarySerializer,%0A       
  Ima
@@ -264,16 +264,17 @@
 rializer
+)
 %0Afrom ap
@@ -817,24 +817,149 @@
 rue)  # NEW%0A
+    user = UserSummarySerializer(source='created_by')%0A    identity = IdentitySummarySerializer(source='created_by_identity')%0A
     machines

Add 'user' and 'identity' attributes to the ImageVersion Details Serializer