from api.models import Launcher, Orbiter, LauncherDetail, Agency
from rest_framework import serializers


class LauncherSerializer(serializers.HyperlinkedModelSerializer):
    class Meta:
        model = Launcher
        fields = ('id', 'url', 'name', 'agency', 'image_url', 'nation_url')


class AgencySerializer(serializers.HyperlinkedModelSerializer):
    launcher_list = serializers.StringRelatedField(many=True)
    orbiter_list = serializers.StringRelatedField(many=True)

    class Meta:
        model = Agency
        fields = ('url', 'agency', 'launchers', 'orbiters', 'launcher_list', 'orbiter_list', 'description', 'image_url', 'nation_url')


class OrbiterSerializer(serializers.HyperlinkedModelSerializer):
    class Meta:
        model = Orbiter
        fields = ('id', 'url', 'name', 'agency', 'history', 'details', 'image_url', 'nation_url',
                  'wiki_link')


class LauncherDetailSerializer(serializers.HyperlinkedModelSerializer):
    class Meta:
        model = LauncherDetail
        fields = ('id', 'url', 'name', 'description', 'family', 's_family', 'agency',
                  'variant', 'alias', 'min_stage', 'max_stage', 'length', 'diameter',
                  'launch_mass', 'leo_capacity', 'gto_capacity', 'to_thrust', 'vehicle_class',
                  'apogee', 'vehicle_range', 'image_url', 'info_url', 'wiki_url')


@@ -290,22 +290,29 @@
 %0A%0Aclass 
-Agency
+LauncherModel
 Serializ
@@ -322,35 +322,24 @@
 serializers.
-Hyperlinked
 ModelSeriali
@@ -352,127 +352,187 @@
     
+c
 la
-uncher_list = serializers.StringRelatedField(many=True)%0A    orbiter_list = serializers.StringRelatedField(many=True)%0A
+ss Meta:%0A        model = Launcher%0A        fields = ('id', 'url', 'name', 'agency', 'image_url', 'nation_url')%0A%0A%0Aclass OrbiterSerializer(serializers.HyperlinkedModelSerializer):
 %0A   
@@ -560,22 +560,23 @@
 model = 
-Agency
+Orbiter
 %0A       
@@ -586,22 +586,36 @@
 elds = (
+'id', 
 'url',
+ 'name',
  'agency
@@ -622,77 +622,235 @@
 ', '
-launchers', 'orbiters', 'launcher_list', 'orbiter_list', 'description
+history', 'details', 'image_url', 'nation_url',%0A                  'wiki_link')%0A%0A%0Aclass OrbiterModelSerializer(serializers.ModelSerializer):%0A    class Meta:%0A        model = Launcher%0A        fields = ('id', 'url', 'name', 'agency
 ', '
@@ -871,32 +871,40 @@
 ation_url')%0A
+        
 %0A%0Aclass 
 OrbiterSeria
@@ -883,39 +883,38 @@
         %0A%0Aclass 
-Orbiter
+Agency
 Serializer(seria
@@ -941,32 +941,173 @@
 delSerializer):%0A
+    launcher_list = LauncherModelSerializer(many=True, read_only=True)%0A    orbiter_list = OrbiterModelSerializer(many=True, read_only=True)%0A%0A
     class Meta:%0A
@@ -1114,39 +1114,38 @@
         model = 
-Orbiter
+Agency
 %0A        fields 
@@ -1143,38 +1143,32 @@
   fields = (
-'id', 
 'url', '
 name', 'agen
@@ -1159,102 +1159,114 @@
 ', '
-name', 'agency', 'history', 'details', 'image_url', 'nation_url',%0A                  'wiki_link
+agency', 'launchers', 'orbiters', 'launcher_list', 'orbiter_list', 'description', 'image_url', 'nation_url
 ')%0A%0A

Change serializer.