title: DRF TypeError 'type' object is not iterable
body: <p>I'm making my first DRF api and I get a strange TypeError when I try to access to my data using a GET request, I get this error: </p>
  
  <blockquote>
    <p>'type' object is not iterable</p>
  </blockquote>
  
  <p>Here are some code snippets bellow.</p>
  
  <p><strong>models.py</strong>
  </p>
  
  <pre><code>from django.db import models
  
  # Create your models here.
  
  class Expediteur(models.Model):
      nom = models.CharField(max_length=50)
      prenom = models.CharField(max_length=100)
      adresse = models.CharField(max_length=200)
      tel = models.IntegerField()
  </code></pre>
  
  <p><strong>views.py</strong>
  </p>
  
  <pre><code>from django.shortcuts import render, get_object_or_404
  from rest_framework import viewsets
  from rest_framework.views import APIView
  from rest_framework.response import Response
  from polls.serializers import ExpediteurSerializer, DestinataireSerializer, LettrePrioSerializer, TypeLettreRecoSerializer, LettreRecoSerializer, TimbrePrioSerializer, TimbreRecoSerializer
  from polls.models import Expediteur, Destinataire, LettrePrio, TypeLettreReco, LettreReco, TimbrePrio, TimbreReco
  from rest_framework import status, HTTP_HEADER_ENCODING
  
  import json
  import datetime
  
  from django.http import HttpResponseRedirect, HttpResponse, Http404
  from django.core.urlresolvers import reverse
  from django.contrib.auth.decorators import user_passes_test
  from django.contrib.auth import login
  from django.core.exceptions import ObjectDoesNotExist
  from django.views.decorators.csrf import csrf_exempt
  from django.utils.timezone import get_current_timezone
  from django.db.models.query import QuerySet
  
  # Create your views here.
  
  class ExpeViewSet(APIView):
      QuerySet = Expediteur.objects.all()
      serializer_class = ExpediteurSerializer
  
      def get(self, request):
          serializer = ExpediteurSerializer(QuerySet, many=True)
          return Response(serializer.data)
  
      def post(self, request):
          serializer = self.serializer_class(data=request.DATA)
          return Response(status=status.HTTP_201_CREATED)
  </code></pre>
  
  <p><strong>serializers.py</strong>
  </p>
  
  <pre><code>from rest_framework import serializers
  from polls.models import Expediteur, Destinataire, LettrePrio, TypeLettreReco, LettreReco, TimbrePrio, TimbreReco
  
  
  class ExpediteurSerializer(serializers.ModelSerializer):
      class Meta:
          model = Expediteur
  </code></pre>
  
  <p>I also leave the Traceback for more informations:</p>
  
  <pre><code>Environment:
  
  
  Request Method: GET
  Request URL: http://0.0.0.0:8000/polls/expediteur/
  
  Django Version: 1.7.1
  Python Version: 2.7.6
  Installed Applications:
  ('django.contrib.admin',
   'django.contrib.auth',
   'django.contrib.contenttypes',
   'django.contrib.sessions',
   'django.contrib.messages',
   'django.contrib.staticfiles',
   'rest_framework',
   'polls')
  Installed Middleware:
  ('django.contrib.sessions.middleware.SessionMiddleware',
   'django.middleware.common.CommonMiddleware',
   'django.middleware.csrf.CsrfViewMiddleware',
   'django.contrib.auth.middleware.AuthenticationMiddleware',
   'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
   'django.contrib.messages.middleware.MessageMiddleware',
   'django.middleware.clickjacking.XFrameOptionsMiddleware')
  
  
  Traceback:
  File "/Library/Python/2.7/site-packages/Django-1.7.1-py2.7.egg/django/core/handlers/base.py" in get_response
    111.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/Library/Python/2.7/site-packages/Django-1.7.1-py2.7.egg/django/views/decorators/csrf.py" in wrapped_view
    57.         return view_func(*args, **kwargs)
  File "/Library/Python/2.7/site-packages/Django-1.7.1-py2.7.egg/django/views/generic/base.py" in view
    69.             return self.dispatch(request, *args, **kwargs)
  File "/Library/Python/2.7/site-packages/rest_framework/views.py" in dispatch
    452.             response = self.handle_exception(exc)
  File "/Library/Python/2.7/site-packages/rest_framework/views.py" in dispatch
    449.             response = handler(request, *args, **kwargs)
  File "/Users/mehdi/rendu/ProjectWeek/CUP/polls/views.py" in get
    29.         return Response(serializer.data)
  File "/Library/Python/2.7/site-packages/rest_framework/serializers.py" in data
    618.         ret = super(ListSerializer, self).data
  File "/Library/Python/2.7/site-packages/rest_framework/serializers.py" in data
    213.                 self._data = self.to_representation(self.instance)
  File "/Library/Python/2.7/site-packages/rest_framework/serializers.py" in to_representation
    568.             self.child.to_representation(item) for item in iterable
  
  Exception Type: TypeError at /polls/expediteur/
  Exception Value: 'type' object is not iterable
  </code></pre>