+ msg = _("""
+ Congratulations! You've accepted an answer.
+ """)
+
+ # Notify the user with a message that an answer has been accepted
+ messages.info(request, msg)
+
+ # Redirect URL should include additional get parameters that might have been attached
+ redirect_url = answer.parent.get_absolute_url() + "?accepted_answer=true&%s" % smart_unicode(urlencode(request.GET))
+
+ return HttpResponseRedirect(redirect_url)