I have already tried looking at other similar responses but have not found anything that helps. I have two pages that are very similar, but one works while the other does not.
In views.py:
if questionType in (1, 2, 6, 7, 8):
return render_to_response('admin/survey/response_option_add.html',
{'surveys': surveys,
'questionType': questionType,
'survey_group_id': survey_group_id,
'survey_group': survey_group,
'responseOptions': responseOptions,
'max_text': max_text}, context_instance=RequestContext(request))
else:
return render_to_response('admin/survey/response_option_add_free_response.html',
{'surveys': surveys,
'questionType': questionType,
'survey_group_id': survey_group_id,
'survey_group': survey_group,
'responseOptions': responseOptions}, context_instance=RequestContext(request))
In response_option_add.html:
<form id="frm1" action={% url "survey:process_add_response_options" survey_group_id %} method=post>
{% csrf_token %}
And in response_option_add_free_response.html:
<form id="frm1" action={% url "survey:process_add_response_options" survey_group_id %} method=post>
{% csrf_token %}
When I use the response_option_add.html file, the page works fine; However, when I use the response_option_add_free_response.html file, I get a csrf verification failed error.