aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/edit/forms.py
diff options
context:
space:
mode:
authorAaron Williamson <aaron@copiesofcopies.org>2012-08-17 00:54:40 -0400
committerJoar Wandborg <git@wandborg.com>2012-09-18 18:10:36 +0200
commitbe5be1154fd22c548125ce5a055af1bdfdad9526 (patch)
treedb14a89519b54b0474fca795d8ab242ab8820bfd /mediagoblin/edit/forms.py
parent09e528acbb4d1321fce5cec8b22fd7fd153bf68a (diff)
downloadmediagoblin-be5be1154fd22c548125ce5a055af1bdfdad9526.tar.lz
mediagoblin-be5be1154fd22c548125ce5a055af1bdfdad9526.tar.xz
mediagoblin-be5be1154fd22c548125ce5a055af1bdfdad9526.zip
Added basic collection functionality
Diffstat (limited to 'mediagoblin/edit/forms.py')
-rw-r--r--mediagoblin/edit/forms.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/mediagoblin/edit/forms.py b/mediagoblin/edit/forms.py
index e2882ada..856852b6 100644
--- a/mediagoblin/edit/forms.py
+++ b/mediagoblin/edit/forms.py
@@ -77,3 +77,19 @@ class EditAttachmentsForm(wtforms.Form):
'Title')
attachment_file = wtforms.FileField(
'File')
+
+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"))])
+ description = wtforms.TextAreaField(
+ _('Description of this collection'),
+ description=_("""You can use
+ <a href="http://daringfireball.net/projects/markdown/basics">
+ Markdown</a> for formatting."""))
+ slug = wtforms.TextField(
+ _('Slug'),
+ [wtforms.validators.Required(message=_("The slug can't be empty"))],
+ description=_(
+ "The title part of this collection's address. "
+ "You usually don't need to change this."))