title: How to print model fields as json output?
body: <p><strong>views.py</strong></p>
  
  <pre><code>def districts_list(request):
      obj_districts_list = Districts.objects.all()
      data = serializers.serialize(
          'json', obj_districts_list, fields=('district_name'))
  
      return HttpResponse(data, content_type="application/json")
  </code></pre>
  
  <p><strong>models.py</strong></p>
  
  <pre><code>class Districts(models.Model):
      id = models.AutoField(primary_key=True)
      district_name = models.CharField(max_length=40)
      country = models.ForeignKey('Country', on_delete=models.CASCADE)
      state = models.ForeignKey('States', on_delete=models.CASCADE)
  
      def __str__(self):
          return '{}'.format(self.district_name)
  </code></pre>
  
  <p><strong>OUTPUT:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/cTtd1.png" alt="Output is JSON format"></p>
  
  <p>But i just want the fields inside the Accounts.districts as output in JSON format.</p>