Permalink
Browse files

Fix feedback submission, fix bug 703433

  • Loading branch information...
1 parent fb39ce4 commit c15b32f8aa64f6703513fc1764482d10e818c046 @davedash davedash committed Nov 18, 2011
Showing with 5 additions and 10 deletions.
  1. +1 −3 apps/feedback/templates/feedback/feedback-form.html
  2. +4 −7 apps/feedback/views.py
@@ -25,9 +25,7 @@
</header>
<section class="content">
- <form action="{{ post_url }}" method="post" autocomplete="off">
-
- {{ csrf() }}
+ <form action="" method="post" autocomplete="off">
<div class="fields">
<div>
{{ form.description.label_tag() }}
View
@@ -2,13 +2,12 @@
from django import http
from django.conf import settings
-from django.shortcuts import get_object_or_404
+from django.shortcuts import get_object_or_404, render
from django.views.decorators.cache import never_cache
-from django.views.decorators.csrf import csrf_exempt
-from django.views.decorators.vary import vary_on_headers
import jingo
from product_details.version_compare import Version
+from session_csrf import anonymous_csrf_exempt
from tower import ugettext as _
import input
@@ -58,7 +57,7 @@ def wrapped(request, *args, **kwargs):
@forward_mobile
@enforce_ua
@never_cache
-@csrf_exempt
+@anonymous_csrf_exempt
def feedback(request, ua):
"""Page to receive feedback under happy/sad/idea categories"""
@@ -92,9 +91,7 @@ def feedback(request, ua):
template = 'feedback/%sindex.html' % (
'mobile/' if request.mobile_site else '')
- return jingo.render(request, template,
- {'forms': forms,
- 'post_url': reverse('feedback')})
+ return render(request, template, {'forms': forms})
@cache_page

0 comments on commit c15b32f

Please sign in to comment.