Commit 9a1479dd authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

HTML page having a captcha field should never be cached.

parent 7506c42c
......@@ -216,6 +216,8 @@ class CaptchaWidget(Widget.TextWidget):
name=key,
css_class=field.get_value('css_class'),
size=10)
# HTML page having a captcha field should never be cached.
REQUEST.RESPONSE.setHeader('Cache-Control', 'max-age=0')
return captcha_field + key_field + splitter + answer
def render_view(self, field, value, REQUEST=None, render_prefix=None):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment