The
IdealWeight(heightdate) is the method that gets executed when API call is made. It has a simple logic to calculate weight(=height*10). The line
returnJsonRespone(…) will send the response back.
Step5: Open urls.py file and add the below lines of code: