Server-side processing problem (still shows processing)

Server-side processing problem (still shows processing)

slopirateslopirate Posts: 1Questions: 0Answers: 0
edited April 2011 in General
When I try to load the page initially, the "Processing" message stays on the screen and no records appear. I can tell using FireBug that an XHR request went out and got a successfull response. The JSON is correct according to JSLint. The number of columns in the table matches the number of columns in aaData... I can't figure out the problem.

I've been through all the examples, FAQ's, and searched the forum but I can't seem to find the problem. I'm using version 1.7.6

Here is the HTML code:
[code]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">



Messages sent

@import "/static/datatables/media/css/demo_page.css";
@import "/static/datatables/media/css/demo_table.css";




/*
$(document).ready(function() {
$('#acks').dataTable({

});
});
*/

$(document).ready(function() {
$('#acks').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "/out/json/"
} );
} );





Messages sent



Case Number
F/U #
Destination
Schedule Date
Generation Date
Transmit Date
ACK Date
Status








[/code]

Here is the JSON response:
[code]
{"aadata": [["None", "", "{HA} EVCTMPROD", "None", "1", "STX283795", "None", "2008-11-06 15:00:00"], ["None", "", "{HA} EVHUMAN", "None", "0", "STX283795", "None", "2008-11-03 15:00:00"], ["None", "Case UK303745 General error while creating E2b report. The message_profile is null within cfg_receiver for agency id: 100152. Stored Procedure: GENERATE_SAFETYREPORT", "{Other} General - Legacy", "None", "0", "UK303745", "None", "2009-10-07 15:00:00"], ["None", "", "{HA} United Kingdom", "None", "2", "US313138", "None", "2009-12-14 15:00:00"], ["None", "", "{HA} Germany-PEI", "None", "5", "US313138", "None", "2009-12-14 15:00:00"], ["None", "", "{HA} EVCTMPROD", "None", "5", "US313138", "None", "2009-12-14 15:00:00"], ["None", "", "{LP} Fake", "None", "3", "US313138", "None", "2009-12-11 15:00:00"], ["None", "", "{Other} General - Legacy", "None", "2", "US313138", "None", "2009-12-11 15:00:00"], ["None", "", "{HA} Germany-PEI", "None", "4", "US313138", "None", "2009-12-08 15:00:00"], ["None", "", "{HA} United Kingdom", "None", "1", "US313138", "None", "2009-12-08 15:00:00"]], "iTotalRecords": 10814, "sEcho": 1, "iTotalDisplayRecords": 10814}
[/code]

I'm using Django. If it helps, here is the view function to generate the JSON:
[code]
def get_all_messages_out_json(request):
cols = ['case_num', 'followup_num']
js_resp = dict()
js_resp['sEcho'] = int(request.GET['sEcho'])
js_resp['iTotalRecords'] = js_resp['iTotalDisplayRecords'] = MessageOut.objects.all().count()
#search_val = request.GET['sSearch'].split('+')
iDisplayStart = int(request.GET['iDisplayStart'])
iDisplayLength = int(request.GET['iDisplayLength'])
message_list = MessageOut.objects.all()[iDisplayStart:iDisplayStart+iDisplayLength]
js_resp['aadata'] = [[str(i) for i in m.values()] for m in message_list.values('case_num','followup_num','message_receiver','report_schedule_date','report_generate_date','report_transmit_date','ack_receive_date','generation_error')]
return HttpResponse(simplejson.dumps(js_resp))
[/code]
This discussion has been closed.