app.middleware

drop_accept_language

drop_accept_language(get_response)

Define the middleware to remove accept-language headers from requests.

This middleware is essentially a hack to allow us to continue to use the standard Django LocaleMiddleware without modification, but simply disable the autodetection aspect based on the Accept-Language header.

drop_recaptcha_post

drop_recaptcha_post(get_response)

Define middleware to alter the request to act as a GET if the post data contains g-recaptcha-response

This middleware allows us to ignore subsequent recaptcha submissions if the user has already passed the recaptcha in a different window.