aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/edit
diff options
context:
space:
mode:
authorLoïc Le Ninan <loic.leninan@gmail.com>2014-06-09 15:14:23 +0200
committerChristopher Allan Webber <cwebber@dustycloud.org>2014-06-13 10:23:07 -0500
commit0742e11dff487e1af27652fcf63f7d53322018cd (patch)
tree82ccd63f72a30795baed0bda855dcd0e743de2d6 /mediagoblin/edit
parentb9d990ac6a401d95eb25a006cd78a51d5cf0ff5a (diff)
downloadmediagoblin-0742e11dff487e1af27652fcf63f7d53322018cd.tar.lz
mediagoblin-0742e11dff487e1af27652fcf63f7d53322018cd.tar.xz
mediagoblin-0742e11dff487e1af27652fcf63f7d53322018cd.zip
Fixes #899 : DeprecationWarning about Required going away in WTForms 3.0. Replaced Required with InputRequired.
Diffstat (limited to 'mediagoblin/edit')
-rw-r--r--mediagoblin/edit/forms.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/mediagoblin/edit/forms.py b/mediagoblin/edit/forms.py
index 7c390a3f..c0bece8b 100644
--- a/mediagoblin/edit/forms.py
+++ b/mediagoblin/edit/forms.py
@@ -40,7 +40,7 @@ class EditForm(wtforms.Form):
"Separate tags by commas."))
slug = wtforms.TextField(
_('Slug'),
- [wtforms.validators.Required(message=_("The slug can't be empty"))],
+ [wtforms.validators.InputRequired(message=_("The slug can't be empty"))],
description=_(
"The title part of this media's address. "
"You usually don't need to change this."))
@@ -87,7 +87,7 @@ class EditAttachmentsForm(wtforms.Form):
class EditCollectionForm(wtforms.Form):
title = wtforms.TextField(
_('Title'),
- [wtforms.validators.Length(min=0, max=500), wtforms.validators.Required(message=_("The title can't be empty"))])
+ [wtforms.validators.Length(min=0, max=500), wtforms.validators.InputRequired(message=_("The title can't be empty"))])
description = wtforms.TextAreaField(
_('Description of this collection'),
description=_("""You can use
@@ -95,7 +95,7 @@ class EditCollectionForm(wtforms.Form):
Markdown</a> for formatting."""))
slug = wtforms.TextField(
_('Slug'),
- [wtforms.validators.Required(message=_("The slug can't be empty"))],
+ [wtforms.validators.InputRequired(message=_("The slug can't be empty"))],
description=_(
"The title part of this collection's address. "
"You usually don't need to change this."))
@@ -104,12 +104,12 @@ class EditCollectionForm(wtforms.Form):
class ChangePassForm(wtforms.Form):
old_password = wtforms.PasswordField(
_('Old password'),
- [wtforms.validators.Required()],
+ [wtforms.validators.InputRequired()],
description=_(
"Enter your old password to prove you own this account."))
new_password = wtforms.PasswordField(
_('New password'),
- [wtforms.validators.Required(),
+ [wtforms.validators.InputRequired(),
wtforms.validators.Length(min=6, max=30)],
id="password")
@@ -117,11 +117,11 @@ class ChangePassForm(wtforms.Form):
class ChangeEmailForm(wtforms.Form):
new_email = wtforms.TextField(
_('New email address'),
- [wtforms.validators.Required(),
+ [wtforms.validators.InputRequired(),
normalize_user_or_email_field(allow_user=False)])
password = wtforms.PasswordField(
_('Password'),
- [wtforms.validators.Required()],
+ [wtforms.validators.InputRequired()],
description=_(
"Enter your password to prove you own this account."))