comparison MoinMoin/security/textcha.py @ 4424:5ad5753ae311

pre-1.9: request.form has qs args and post data, 1.9: .form only post data, .args only qs args, .values both
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 16 Nov 2008 22:20:21 +0100
parents a952d07dea69
children d44a9c23438c
comparison
equal deleted inserted replaced
4423:135d4a7dc09d 4424:5ad5753ae311
139 return question_form, given_answer_form 139 return question_form, given_answer_form
140 140
141 def _extract_form_values(self, form=None): 141 def _extract_form_values(self, form=None):
142 if form is None: 142 if form is None:
143 form = self.request.form 143 form = self.request.form
144 question = form.get('textcha-question', [None])[0] 144 question = form.get('textcha-question')
145 given_answer = form.get('textcha-answer', [u''])[0] 145 given_answer = form.get('textcha-answer', u'')
146 return question, given_answer 146 return question, given_answer
147 147
148 def render(self, form=None): 148 def render(self, form=None):
149 """ Checks if textchas are enabled and returns HTML for one, 149 """ Checks if textchas are enabled and returns HTML for one,
150 or an empty string if they are not enabled. 150 or an empty string if they are not enabled.