title: TypeError: 'User' object is not subscriptable
body: <p>I am doing basic message app for users can send message other user...</p>
  
  <p>here my models.py</p>
  
  <pre><code>class Messages(Model):
  created_at = DateTimeField(null=True, blank=True, auto_now_add=True, editable=False,
                             verbose_name='Yaratılma Tarihi')
  message = TextField(max_length=500, verbose_name='Mesaj', null=True, blank=True, )
  sender = ForeignKey('dentis.User', verbose_name='Gönderen', related_name='User')
  target = ForeignKey('dentis.User', verbose_name='Alıcı', related_name='target')
  read_at = BooleanField(default=False, verbose_name='Okundu', blank=True, )
  
  class Meta:
      verbose_name = 'Mesaj'
      verbose_name_plural = 'Mesajlar'
  
  def __str__(self):
      return u'%s / %s/' % (self.sender.email, self.message[:15])
  
  def get_type(self):
      return 'message'
  </code></pre>
  
  <p>here my rest api views</p>
  
  <pre><code>class MessageAPIView(ModelViewSet):
  serializer_class = MessageSerializer
  filter_backends = (filters.DjangoFilterBackend,)
  filter_class = MessageUserFilter
  permission_classes = (AuthenticatedUserOnly,)
  
  def get_user(self):
      if self.request.user.is_authenticated():
          return self.request.user
      else:
          raise Http404
  
  def get_queryset(self):
      messages = Messages.objects.filter(
          Q(sender=self.get_user()) | Q(target=self.get_user())).order_by('-created_at').distinct()
  
      return messages
  
  def perform_create(self, serializer):
      if self.request.user.is_authenticated():
  
          try:
              target_email = serializer.validated_data['target']['email']
              target = User.objects.get(email=target_email)
          except User.DoesNotExist:
              raise ValidationError('Hedef Kullanıcı bulunamadı')
          except KeyError:
              raise ValidationError('Hedef kullanıcı belirtilmedi')
  
          sender = self.request.user
          serializer.save(sender=sender, target=target)
      else:
          raise Http404
  </code></pre>
  
  <p>And my Serializers</p>
  
  <pre><code>class MessageSerializer(ModelSerializer):
  sender = UserMobileSerializer(read_only=True)
  target = UserMobileSerializer()
  
  class Meta:
      model = Messages
      fields = '__all__'
  </code></pre>
  
  <p>When I send a message then return this error:</p>
  
  <blockquote>
    <p>line 163, in perform_create
        target_email = serializer.validated_data['target']['email']</p>
    
    <p>TypeError: 'User' object is not subscriptable</p>
    
    <p>[28/Apr/2018 18:56:04] "POST /api/v1/message/ HTTP/1.1" 500 15742</p>
  </blockquote>
  
  <p>My usermodel use </p>
  
  <blockquote>
    <p>USERNAME_FIELD = 'email'</p>
  </blockquote>
  
  <p>not use username field</p>