title: Viewset 'create' custom assign value in Django Rest Framework
body: <p>Would like to set a <em>CustomUser</em>'s username by using the input email, but where to do the custom assigning, in view? At the same time it receiving a file as well.</p>
  
  <p><strong>Models.py</strong></p>
  
  <pre><code>class CustomUser(AbstractUser):
      avatar = models.ImageField(max_length=None, upload_to='avatar', blank=True)
  </code></pre>
  
  <p><strong>Serializers.py</strong></p>
  
  <pre><code>class CustomUserSerializer(serializers.ModelSerializer):
  
      class Meta:
          model = CustomUser
          fields = ('id', 'first_name', 'last_name', 'email', 'password', 'avatar', 'groups')
  </code></pre>
  
  <p><strong>Views.py</strong></p>
  
  <pre><code>class CustomUserViewSet(viewsets.ModelViewSet):
  
      queryset = CustomUser.objects.all()
      serializer_class = CustomUserSerializer
  </code></pre>
  
  <p>thank you in advance.</p>