title: Setting user id automatically on POST in Django REST
body: <p>I'm trying to POST a "record" using Django REST. I want Django to automagically set the user id from the logged in user. </p>
  
  <p>views.py:</p>
  
  <pre><code>class ItemViewSet(viewsets.ModelViewSet):
      queryset = Item.objects.all()
      serializer_class = ItemSerializer
  
      def perform_create(self, serializer):
          serializer.save(owner=self.request.user)
  </code></pre>
  
  <p>serializers.py:</p>
  
  <pre><code>class ItemSerializer(serializers.ModelSerializer):
      class Meta:
          model = Item
          fields = ('id', 'created', 'owner', 'desc')
          read_only_fields = ('owner',)
  </code></pre>
  
  <p>models.py:</p>
  
  <pre><code>class Item(models.Model):
      created = models.DateTimeField(auto_now_add=True)
      owner = models.ForeignKey('appserver.MyUser', related_name='appserver')
      desc = models.CharField(max_length=100, blank=True, default='')
  </code></pre>
  
  <p>I am using EmailAbstractUser from django-rest-authemail 0.1.4:</p>
  
  <p>views.py:</p>
  
  <pre><code>class MyUser(EmailAbstractUser):
      date_of_birth = models.DateField('Date of birth', null=True, blank=True)
      objects = EmailUserManager()
  </code></pre>
  
  <p>Any help appreciated.</p>