int() error in django views
        Posted  
        
            by Hulk
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Hulk
        
        
        
        Published on 2010-03-31T10:25:45Z
        Indexed on 
            2010/03/31
            10:33 UTC
        
        
        Read the original article
        Hit count: 805
        
def displaydata(request):
    response_dict = {}
    offset = int(request.GET.get('iDisplayStart'))
There is an error as, int() argument must be a string or a number at the above said line (i.e,`request.GET.get('iDisplayStart'))
And in the template code,
 $(document).ready(function() {
 $.ajaxSetup({ cache: false });
 oTable = $('#qp_table').dataTable( {
  "aoColumns": [
     {"sWidth": "5%" }, 
     {"sWidth": "35%" },
     {"sWidth": "27%" },
     {"sWidth": "15%"},
     { "bSortable": false, "sWidth": "0%"},
     {"bSortable": false, "sWidth": "0%"} 
  ],
  "aaSorting": [[0, 'asc']],
  "bProcessing": true,
  "bServerSide": true,
  "sAjaxSource": "/diaplaydata/",
  "bJQueryUI": true,
  "sPaginationType": "full_numbers",
  "bFilter": false,
  "oLanguage" : { "sZeroRecords": "No data found", "sProcessing" : "Fetching Data" }
  });
© Stack Overflow or respective owner