title: How to remove certain fields when doing serialization to a Django model?
body: <p>I have the following model in my Django app:</p>
  
  <pre><code>class Policy(models.Model):
  
      class Meta:
          verbose_name_plural = "policies"
  
      name = models.CharField(max_length=45)
      last_update = models.DateTimeField()
      content = models.TextField()
  
      @classmethod
      def create(cls, name, last_update, content):
          policy = cls(name=name, last_update=last_update, content=content)
          return policy
  </code></pre>
  
  <p>Now, I have a datatable, where I fill the rows using this function from  views.py:</p>
  
  <pre><code>def myModel_asJson(request):
      object_list = Policy.objects.all() #or any kind of queryset
      json = serializers.serialize('json', object_list)
      return HttpResponse(json, content_type='application/json')
  </code></pre>
  
  <p>However, my data table doesn't contain content column.
  My question is - how can I omit the content field from my model when I do the serialization? Is there any other approach I can use to return JSON representation of my models without the content field?</p>