projects
/
mediagoblin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e6fd112
)
Bug #437 - adds required validator to slug field for media edit'
author
Caleb Forbes Davis V
<caldavis@gmail.com>
Thu, 7 Jul 2011 16:11:03 +0000
(11:11 -0500)
committer
Caleb Forbes Davis V
<caldavis@gmail.com>
Thu, 7 Jul 2011 16:11:03 +0000
(11:11 -0500)
otherwise we get a 404 because we navigate to blank slug
mediagoblin/edit/forms.py
patch
|
blob
|
blame
|
history
diff --git
a/mediagoblin/edit/forms.py
b/mediagoblin/edit/forms.py
index d5e7f0a99821670799c9445f76d83e3d0ea4ba66..0ed52af11ea4a24b6265b735197fdc9006d2d454 100644
(file)
--- 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):