Harsha Jasti Harsha Jasti - 8 months ago 54
AngularJS Question

not able to call python file output using angularjs

I am very new to angularjs.
I am working on a code where depending on the output of the python file, the angularjs file should react differently.
I keep getting this particular error

angular.js:10765 GET http://harsha.seq-technology.in/ajax/duplicate_check.py?q=0 500 (Internal Server Error)

what am i doing wrong ?
my script file is as below:

$scope.save_me = function () {
$http.get("/ajax/duplicate_check.py",{params{"q":0}}).then(function(response) {

if (response.data['login_status'] == 1 ){
console.log("Mission is a Success\n");

my python file gives the output as follows:

Content-Type: application/json

{"login_status": 1}

Help is greatly appreciated.


This has nothing to do with angularjs, first be sure you make your "script" return a proper HTTP response with a 200 result code.

You can curl or wget to debug the result before doing anything else.