title: How to use datatables server-side processing with django rest framework
body: <p>I try to use <a href="https://www.datatables.net/examples/data_sources/server_side.html" rel="nofollow noreferrer">datatables</a> :server-side processing</p>
  <p>I have a view :</p>
  <pre><code>class DataList(generics.ListAPIView):
      queryset = Data.objects.all()
      serializer_class = DataSerializer
   
  </code></pre>
  <p>And my html :</p>
  <pre><code>$(document).ready(function() {
     $('#example').dataTable( {
  
          &quot;processing&quot;: true,   
          /* serverSide:true  */        
          &quot;deferRender&quot;: true,           
          &quot;iDisplayLength&quot;: 25,
          &quot;paging&quot;: true,
          ajax: {
           url: 'http://127.0.0.1:8000/api/datas/',
           dataSrc: ''
          },
         columns: [
              { &quot;data&quot;: &quot;id&quot;},
              { &quot;data&quot;: &quot;name&quot;},
              { &quot;data&quot;: &quot;update_time&quot;},
              { &quot;data&quot;: &quot;description&quot;},
          ]
     });
  </code></pre>
  <p>});</p>
  <p>This works good.</p>
  <p>And then  I comment out the <code>serverSide:true</code>  :</p>
  <pre><code>$(document).ready(function() {
     $('#example').dataTable( {
  
          &quot;processing&quot;: true,   
          &quot;serverSide&quot;: true,        
          &quot;deferRender&quot;: true,           
          &quot;iDisplayLength&quot;: 25,
          &quot;paging&quot;: true,
          ajax: {
           url: 'http://127.0.0.1:8000/api/datas/',
           dataSrc: ''
          },
         columns: [
              { &quot;data&quot;: &quot;id&quot;},
              { &quot;data&quot;: &quot;name&quot;},
              { &quot;data&quot;: &quot;update_time&quot;},
              { &quot;data&quot;: &quot;description&quot;},
          ]
     });
  </code></pre>
  <p>});</p>
  <p>The <code>paginator</code> and <code>search</code> and <code>ordering</code> not work anymore<br />
  It seems like it query all data.</p>
  <p>I see the datatable example is with php.<br />
  I want to intergrate datatable with django rest framework ,What else should I set ??</p>