title: TypeError: __init__() got an unexpected keyword argument 'many'
body: <p>While trying to return a query-set using generic views, I get an error </p>
  
  <blockquote>
    <p>TypeError: <strong>init</strong>() got an unexpected keyword argument 'many'</p>
  </blockquote>
  
  <p>I am unable to understand the source of this error as it seems to be originating from internal libraries. I have no clue as to why this error originated as the create API works just fine.</p>
  
  <p><strong>Complete StackTrace</strong></p>
  
  <pre><code>System check identified 1 issue (0 silenced).
  July 16, 2018 - 13:25:43
  Django version 1.11.7, using settings 'BirthdayPostStash.settings'
  Starting development server at http://127.0.0.1:8000/
  Quit the server with CONTROL-C.
  &lt;QuerySet [&lt;Photos: 1&gt;, &lt;Photos: 2&gt;, &lt;Photos: 3&gt;, &lt;Photos: 4&gt;, &lt;Photos: 5&gt;, &lt;Photos: 6&gt;, &lt;Photos: 7&gt;, &lt;Photos: 8&gt;, &lt;Photos: 9&gt;, &lt;Photos: 10&gt;, &lt;Photos: 11&gt;, &lt;Photos: 12&gt;]&gt;
  Internal Server Error: /photos/list-photo/
  Traceback (most recent call last):
    File "/home/t2b/env/bpstash/local/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
      response = get_response(request)
    File "/home/t2b/env/bpstash/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 187, in _get_response
      response = self.process_exception_by_middleware(e, request)
    File "/home/t2b/env/bpstash/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 185, in _get_response
      response = wrapped_callback(request, *callback_args, **callback_kwargs)
    File "/home/t2b/env/bpstash/local/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
      return view_func(*args, **kwargs)
    File "/home/t2b/env/bpstash/local/lib/python2.7/site-packages/django/views/generic/base.py", line 68, in view
      return self.dispatch(request, *args, **kwargs)
    File "/home/t2b/env/bpstash/local/lib/python2.7/site-packages/rest_framework/views.py", line 489, in dispatch
      response = self.handle_exception(exc)
    File "/home/t2b/env/bpstash/local/lib/python2.7/site-packages/rest_framework/views.py", line 449, in handle_exception
      self.raise_uncaught_exception(exc)
    File "/home/t2b/env/bpstash/local/lib/python2.7/site-packages/rest_framework/views.py", line 486, in dispatch
      response = handler(request, *args, **kwargs)
    File "/home/t2b/env/bpstash/local/lib/python2.7/site-packages/rest_framework/generics.py", line 201, in get
      return self.list(request, *args, **kwargs)
    File "/home/t2b/env/bpstash/local/lib/python2.7/site-packages/rest_framework/mixins.py", line 44, in list
      serializer = self.get_serializer(page, many=True)
    File "/home/t2b/env/bpstash/local/lib/python2.7/site-packages/rest_framework/generics.py", line 112, in get_serializer
      return serializer_class(*args, **kwargs)
    File "/home/t2b/env/bpstash/local/lib/python2.7/site-packages/rest_framework/fields.py", line 1774, in __init__
      super(ModelField, self).__init__(**kwargs)
  TypeError: __init__() got an unexpected keyword argument 'many'
  [16/Jul/2018 13:25:45] "GET /photos/list-photo/ HTTP/1.1" 500 111194
  </code></pre>
  
  <p><strong>models.py</strong></p>
  
  <pre><code>class Photos(models.Model):
  
  owner = models.ForeignKey(User, related_name="photos_owner")
  photo = models.ImageField(upload_to=get_image_path, blank=True)
  participants = models.ManyToManyField(
                Person,
                related_name="photos_participants",
                null=True,
                blank=True)
  </code></pre>
  
  <p><strong>views.py</strong></p>
  
  <pre><code>class ListPhoto(generics.ListAPIView):
  permission_classes = (permissions.IsAuthenticated,)
  serializer_class = PhotoPublicSerializer
  model = Photos
  
  def get_queryset(self):
      return self.model.objects.all()
  </code></pre>
  
  <p><strong>serializer.py</strong></p>
  
  <pre><code>class PhotoPublicSerializer(serializers.ModelField):
  participants = PersonPublicSerializer(read_only=True)
  
  class Meta:
      model = Photos
      fields = '__all__'
  </code></pre>
  
  <p><strong>personserializer.py</strong></p>
  
  <pre><code>class PersonPublicSerializer(serializers.ModelSerializer):
      class Meta:
          model = Person
          fields = '__all__'
  </code></pre>