I have a controller function in my app

$scope.segmentImage = function(image)
{
$http({method:'POST', url:'127.0.0.1:8000/image/segment_image/', data:{'image': 
image}})
    .then(function successCallback(response)
    {
        console.log('success')
    },function errorCallback(response)
    {
        console.log('failed')
        console.log(response.config)
        console.log(response.statusText)
    }
)};


where the url routes to a simple djangoview which has a python function 
which does some processing on image and returns four values(x,y,w,h).Now i 
have two queries:
1)how to collect the image(data) sent by this post method(http) and pass 
the same to the python function in my views.py file so that i can use the 
image in my python script to process it?
2)how can i render the returned values(x,y,w,h) back to the angular app

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to