title: Django REST serializer and extra attributes from custom model fields
body: <p>How can i pass extra attributes from my custom model field to the serializer?</p>
  
  <p>For example i have this custom model field RsTestField which has an extra attribute "info" which is True or False:</p>
  
  <pre><code>class RsTestField(models.Field):
  
      __metaclass__ = models.SubfieldBase
  
      def get_internal_type(self):
          return "CharField"
  
      def __init__(self, info=False, *args, **kwargs):
          self.info = info
          super(RsTestField, self).__init__(*args, **kwargs)
  
      def is_info(self):
          return self.info
  </code></pre>
  
  <p>Which is used in the following model, where i can pass the value of this custom attribute:</p>
  
  <pre><code>class Client(models.Model):
  
      test1 = RsTestField(max_length=255, info=True, default="")
      name1 = models.CharField(max_length=255, default="")
  </code></pre>
  
  <p>And the following serializer:</p>
  
  <pre><code>class ClientSerializer(serializers.HyperlinkedModelSerializer):
  
      test1 = ModelField(model_field=Client()._meta.get_field('test1'))
  
      class Meta:
          model = Client
          fields = ('name1','test1')
  </code></pre>
  
  <p>I want to be able to access the test1-info attribute just like i would be able to access the name1-max_length attribute.</p>
  
  <p>Is this possible?</p>
  
  <p>The goal is to eventually pass this attribute in the Scheme overview which can be retrieved with the OPTIONS http request:</p>
  
  <pre><code>"actions": {
      "POST": {
          "name1": {
              "type": "string",
              "required": false,
              "read_only": false,
              "label": "Client name 1",
              "max_length": 255
          },
          "test1": {
              "type": "field",
              "required": true,
              "read_only": false,
              "label": "Test1"
          }
      }
  }
  </code></pre>
  
  <p>In "test1" there should come an extra key:</p>
  
  <pre><code>"info": True
  </code></pre>