title: django rest framework and model inheritance
body: <p>I have an "abstract" model class MyField:</p>
  
  <pre><code>class MyField(models.Model):
      name = models.CharField(db_index = True, max_length=100)
      user = models.ForeignKey("AppUser", null=False)
  </code></pre>
  
  <p>I have a few other subclasses of MyField each defining a value of a specific type.
  for example:</p>
  
  <pre><code>class MyBooleanField(MyField):
      value = models.BooleanField(db_index = True, default=False)
  </code></pre>
  
  <p>In MyField I have a method get_value() that returns the value based on the specific subclass.</p>
  
  <p>In django rest I want to fetch all the fields of a user</p>
  
  <pre><code>class AppUserSerializer(serializers.ModelSerializer):
      appuserfield_set = MyFieldSerializer(many=True)
      class Meta:
          model = AppUser
          fields = ('appuser_id', 'appuserfield_set')    
  </code></pre>
  
  <p>On the client side I want the user to be able to add new fields and set values to them and then on the server I want to be able to create the correct field based on the value.</p>
  
  <p>What is the correct way to achieve this behavior?</p>