title: How can I define a list field in django rest framework?
body: <p>Let's say I have a class</p>
  
  <pre><code>class Tags(object):
  
      tags = []
  
      def __init__(self, tags):
          self.tags = tags
  </code></pre>
  
  <p>and a custom list field</p>
  
  <pre><code>class TagsField(serializers.WritableField):
      """
      Returns a list of tags, or serializes a list of tags
      """
  </code></pre>
  
  <p>I am not too sure where to go from here. How can I make sure that a blog post serializer defined as</p>
  
  <pre><code>class BlogPostSerializer(serializers.Serializer):
      post = CharField()
      tags = TagsField
  </code></pre>
  
  <p>would give me a json object similar to</p>
  
  <pre><code>{
      "post": "Here is my blog post about python",
      "tags": ["python", "django", "rest"]
  }
  </code></pre>