Add forms for editing and creating forms
authorAditi <aditi.iitr@gmail.com>
Fri, 28 Jun 2013 16:51:27 +0000 (22:21 +0530)
committerAditi <aditi.iitr@gmail.com>
Fri, 28 Jun 2013 16:51:27 +0000 (22:21 +0530)
mediagoblin/media_types/blog/forms.py

index 3e94998eda021cb30838307e76ed61a79730401e..fa409519b09d8c9756d433fdbb502d6cbd723877 100644 (file)
@@ -16,9 +16,9 @@
 
 import wtforms
 
-from mediagoblin.tols.text import tag_length_validator, TOO_LONG_TAG_WARNING
-from mediagoblin.tools.translate import lazy_pass_to_uggettext as _
-from mediagoblin.tools.licences import licences_as_choices
+from mediagoblin.tools.text import tag_length_validator, TOO_LONG_TAG_WARNING
+from mediagoblin.tools.translate import lazy_pass_to_ugettext as _
+from mediagoblin.tools.licenses import licenses_as_choices
 
 class BlogPostEditForm(wtforms.Form):
     title = wtforms.TextField(_('Title'),
@@ -28,6 +28,12 @@ class BlogPostEditForm(wtforms.Form):
                description="Seperate tags by commas.")
     license = wtforms.SelectField(_('License'), 
                [wtforms.validators.Optional(),], choices=licenses_as_choices())
+
+class BlogEditForm(wtforms.Form):
+    title = wtforms.TextField(_('Title'),
+               [wtforms.validators.Length(min=0, max=500)])
+    description = wtforms.TextAreaField(_('Content'))
+