python - Django - [Errno 32] Broken pipe -
i have error , don't know reason :
this error in console :
[05/jul/2015 15:42:35] "post /suppression-demande http/1.1" 200 4262 traceback (most recent call last): file "/usr/lib/python2.7/wsgiref/handlers.py", line 86, in run self.finish_response() file "/usr/lib/python2.7/wsgiref/handlers.py", line 128, in finish_response self.write(data) file "/usr/lib/python2.7/wsgiref/handlers.py", line 212, in write self.send_headers() file "/usr/lib/python2.7/wsgiref/handlers.py", line 270, in send_headers self.send_preamble() file "/usr/lib/python2.7/wsgiref/handlers.py", line 194, in send_preamble 'date: %s\r\n' % format_date_time(time.time()) file "/usr/lib/python2.7/socket.py", line 324, in write self.flush() file "/usr/lib/python2.7/socket.py", line 303, in flush self._sock.sendall(view[write_offset:write_offset+buffer_size]) error: [errno 32] broken pipe [05/jul/2015 15:42:35] "post /suppression-demande http/1.1" 500 59
on click on button, js methods called :
function goto_confirm(username){ adress = "/suppression-demande" if(confirm("are sure ?")){ $.ajax({ type:"post", url:adress, data: { 'confirmation_suppression': true, }, success: function(data){ alert("data : "+data); } }); window.location.href = "/home"; } return false; }
the url : url(r'^suppression-demande$', 'supprimer_demande', name="supprimer_demande"),
my view called js method :
def supprimer_demande(request): confirmation = request.post.get("confirmation_suppression") return render(request,"website/lsdme.html")
try removing
window.location.href = "/home";
js method go_confirm().
Comments
Post a Comment