Hi,

I am new to Django and I was creating a basic site with it. But I have 
encountered a problem.

In the following code, I have a webpage with form and when submit button is 
clicked, the parameters have to be passed into a results page for display. 
When I keep render_to_response of the results page, the results page is 
shown instead of the main page.

How to solve this problem?

def mix(request):
    if request.method == 'GET':
        
        valueList = []
        valueListInt = []
        for i in range(1,20):
            questionNum = ('qn'+str(i))
            valueList.append(request.GET.getlist(questionNum))
        #return redirect('mixResult.html', {'qn1Ans':str(valueList[0]), 
'qn2Ans':valueList[1], 'qn3Ans':valueList[2], 'qn4Ans':valueList[3], 
'qn5Ans':valueList[4], 'qn6Ans':valueList[5], 'qn7Ans':valueList[6], 
'qn8Ans':valueList[7], 'qn9Ans':valueList[8], 'qn10Ans':valueList[9], 
'qn11Ans':valueList[10], 'qn12Ans':valueList[11], 'qn13Ans':valueList[12], 
'qn14Ans':valueList[13], 'qn15Ans':valueList[14], 'qn16Ans':valueList[15], 
'qn17Ans':valueList[16], 'qn18Ans':valueList[17], 'qn19Ans':valueList[18],})
        total = 0
        for i in range(len(valueList)):
            total = total + i
        print 'total', total
        if total == 171:
            print 'wooooooooooooooooohooooooooooooooo'
          
        return render_to_response('mix.html')

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/5fQslYLkgwgJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to