title: [Django rest framework]: Serialize a list of strings
body: <p>I am working with django and djando rest framework</p>
  
  <p>I have created a new endpoint <code>installedapps</code>. When making <code>GET</code> requests to it, I want to return the data contained as a list of strings (list of installed apps)</p>
  
  <p>The list of strings looks something like this:</p>
  
  <pre class="lang-python prettyprint-override"><code>installed_apps = ['django_admin_bootstrapped', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.humanize', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'rest_framework', 'django_js_reverse', 'djcelery', 'bootstrap3', 'foo', 'bar', 'apirest']
  </code></pre>
  
  <p>Until now I have only worked with model serializers, and everything was pretty easy. But now i dont know how to return this list of strings</p>
  
  <p>This is what I have tried so far:</p>
  
  <pre class="lang-python prettyprint-override"><code>class InstalledAppsViewSet(viewsets.ViewSet):
      serializer_class = serializers.InstalledAppsSerializer
  
      def list(self, request):
          from credits.views import GetInstalledApps
  
          installed_apps = GetInstalledApps.get_installed_apps()
  
          serializer = serializers.InstalledAppsSerializer(
              instance=installed_apps, many=True)
  
          return Response(serializer.data)
  
  
  
  
  class InstalledAppsSerializer(serializers.ListField):
  
      name = serializers.CharField(max_length=256)
  
      child = serializers.CharField()
  
      installed_apps_field = serializers.SerializerMethodField(
          'get_installed_apps')
  </code></pre>
  
  <p>I am always getting all kind of errors. Any help on how to return the content of the list of strings?</p>
  
  <p><strong>Update</strong></p>
  
  <p>I have tried @e4c5 code, leaving it like this:</p>
  
  <pre class="lang-python prettyprint-override"><code>class InstalledAppsViewSet(viewsets.ViewSet):
      serializer_class = serializers.InstalledAppsSerializer
  
      def list(self, request):
  
          serializer = serializers.InstalledAppsSerializer
  
  
  class InstalledAppsSerializer(serializers.Serializer):
  
      name = serializers.CharField(max_length=256)
  
      child = serializers.CharField()
  
      installed_apps = serializers.SerializerMethodField('get_the_installed_apps')
  
  
      def get_the_installed_apps(self):
          from credits.views import GetInstalledApps
          installed_apps = GetInstalledApps.get_installed_apps()
  
          return installed_apps
  </code></pre>
  
  <p>And I'm still getting errors. But I don't get the error message anywhere. Any help?</p>