aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/edit/forms.py
diff options
context:
space:
mode:
authorCaleb Forbes Davis V <caldavis@gmail.com>2011-07-07 11:11:03 -0500
committerCaleb Forbes Davis V <caldavis@gmail.com>2011-07-07 11:11:03 -0500
commit0e1c036c7ae388b10940606dca28f1c638035a45 (patch)
treedaef563ae12712af76d3a7a9795d6ef356699c29 /mediagoblin/edit/forms.py
parente6fd112d429d1fcc5994ff19c61bd67367a33ce5 (diff)
downloadmediagoblin-0e1c036c7ae388b10940606dca28f1c638035a45.tar.lz
mediagoblin-0e1c036c7ae388b10940606dca28f1c638035a45.tar.xz
mediagoblin-0e1c036c7ae388b10940606dca28f1c638035a45.zip
Bug #437 - adds required validator to slug field for media edit'
otherwise we get a 404 because we navigate to blank slug
Diffstat (limited to 'mediagoblin/edit/forms.py')
-rw-r--r--mediagoblin/edit/forms.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/mediagoblin/edit/forms.py b/mediagoblin/edit/forms.py
index d5e7f0a9..0ed52af1 100644
--- a/mediagoblin/edit/forms.py
+++ b/mediagoblin/edit/forms.py
@@ -23,7 +23,8 @@ class EditForm(wtforms.Form):
'Title',
[wtforms.validators.Length(min=0, max=500)])
slug = wtforms.TextField(
- 'Slug')
+ 'Slug',
+ [wtforms.validators.Required(message="The slug can't be empty")])
description = wtforms.TextAreaField('Description of this work')
class EditProfileForm(wtforms.Form):