For Django’s CSRF failure middleware, how can you get the CSRF errors to report what URL is failing?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I registered an error handler for csrf_failures (called csrf_failure) and the “request.path” has the url that was rejected during the CSRF failure.
def csrf_failure(request, reason=""): print "CSRF failure: reason=%s, url=%s" % (reason, request.path) ...