Example #1
0
def submit_points(request):
    if request.method == 'POST':
        for input_num in range(8):
            p = Point(id = input_num+1)
            p.posx = float(request.POST.get('x' + str(input_num+1), ''))
            p.posy = float(request.POST.get('y' + str(input_num+1), ''))
            p.save()
    return HttpResponseRedirect('/calculate/')
Example #2
0
def submit_points(request):
    if request.method == 'POST':
        for input_num in range(8):
	        p = Point(input_number = fromPOST,
                          posx = request.POST.get(str('x'+input_num), ''),
                          posy = request.POST.get(str('x'+input_num), ''))
                p.save()
    return HttpResponseRedirect('/linreg/')