title: Cannot exclude pk and model from serializer in django 1.8
body: <p>I'm trying to get rid of <code>pk</code> and <code>model</code> from the output json object as part of Django serialization. I tried the below code in views.py, but it threw the below error</p>
  
  <pre><code>TypeError: serialize() takes 2 positional arguments but 3 were given.
  </code></pre>
  
  <p>To solve this, I used <code>@staticmethod</code> as well, but no much use.</p>
  
  <p>Here is the <strong>views.py</strong></p>
  
  <pre><code>def get_stats(request):
      if request.method == "POST":
          srch_dropV = request.POST['srch_dropAJ']
      else:
          srch_dropV = ''
      if(srch_dropV == 'Lock'):
          stud = LockBased.objects.all()
      response_data = {}
      response_data['result'] = 'Success'
      serializer = NewSerializer()
      response_data['message'] = serializer.serialize('json', stud)
      return HttpResponse(JsonResponse(response_data), content_type="application/json")
  
  
  from django.core.serializers.json import Serializer, DjangoJSONEncoder
  import json
  
  class NewSerializer(Serializer):
      def end_serialization(self):
          cleaned_objects = []
  
          for obj in self.objects:
              del obj['pk']
              del obj['model'] 
              cleaned_objects.append(obj)
  
          json.dump(cleaned_objects, self.stream, cls=DjangoJSONEncoder, **self.options)
  </code></pre>
  
  <p>Please help me to identify the issue and fix it.<br>
  I'm using Django 1.8 and Python 3.4.</p>