title: how to define a userprofile into UserDetialsSerializer?
body: <p>I want to be able to access a <code>userprofile</code> instance through :<br>
  <code>profile = instance.userprofile</code> statement in <code>UserSerializer</code></p>
  
  <p><code>instance</code> is created through:<br>
  <code>instance = super(UserSerializer, self).update(instance, validated_data)</code> statement in 
  <code>UserSerializer</code></p>
  
  <p>Since <code>UserSerializer</code> is inheriting <code>UserDetailsSerializer</code>, i think i should define a <code>userprofile</code> in <code>UserDetailsSerializer</code>. <br> 
  But i dont know how to do it ?</p>
  
  <p><strong>Question:</strong> How to define <code>userprofile</code> in <code>UserDetailsSerializer</code> to achieve the above ?<br></p>
  
  <p><strong>UserSerializer:</strong></p>
  
  <pre><code>class UserSerializer(UserDetailsSerializer):
      company_name = serializers.CharField(source="userprofile.company_name")
  
      class Meta(UserDetailsSerializer.Meta):
          fields = UserDetailsSerializer.Meta.fields + ('company_name',)  
  
      def update(self, instance, validated_data):
          profile_data = validated_data.pop('userprofile', {})
          company_name = profile_data.get('company_name')
  
          instance = super(UserSerializer, self).update(instance, validated_data)
  
          # get and update user profile
          profile = instance.userprofile
          if profile_data and company_name:
              profile.company_name = company_name
              profile.save()
          return instance
  </code></pre>
  
  <p><strong>UserDetailsSerializer:</strong></p>
  
  <pre><code>class UserDetailsSerializer(serializers.ModelSerializer):
      class Meta:
          model = get_user_model()
  
          fields = ('username','email', 'first_name', 'last_name')
          read_only_fields = ('email', )
  </code></pre>
  
  <p><strong>UserProfile</strong> model:</p>
  
  <pre><code>class UserProfile(models.Model):
      user = models.OneToOneField(User)
      # custom fields for user
      company_name = models.CharField(max_length=100)
  </code></pre>
  
  <p>Do ask if more clarity is required?</p>