Fixes #899 : DeprecationWarning about Required going away in WTForms 3.0. Replaced Required with InputRequired.

This commit is contained in:
Loïc Le Ninan
2014-06-09 15:14:23 +02:00
committed by Christopher Allan Webber
parent b9d990ac6a
commit 0742e11dff
10 changed files with 38 additions and 38 deletions

View File

@@ -21,7 +21,7 @@ from mediagoblin.tools.translate import lazy_pass_to_ugettext as _
class MediaCommentForm(wtforms.Form):
comment_content = wtforms.TextAreaField(
_('Comment'),
[wtforms.validators.Required()],
[wtforms.validators.InputRequired()],
description=_(u'You can use '
u'<a href="http://daringfireball.net/projects/markdown/basics" target="_blank">'
u'Markdown</a> for formatting.'))
@@ -53,11 +53,11 @@ class MediaCollectForm(wtforms.Form):
class CommentReportForm(wtforms.Form):
report_reason = wtforms.TextAreaField(
_('Reason for Reporting'),
[wtforms.validators.Required()])
[wtforms.validators.InputRequired()])
reporter_id = wtforms.HiddenField('')
class MediaReportForm(wtforms.Form):
report_reason = wtforms.TextAreaField(
_('Reason for Reporting'),
[wtforms.validators.Required()])
[wtforms.validators.InputRequired()])
reporter_id = wtforms.HiddenField('')