Add ConfirmDeleteForm and URL mapping for blog_delete view
authorAditi Mittal <aditi.iitr@gmail.com>
Mon, 9 Sep 2013 16:22:00 +0000 (21:52 +0530)
committerAditi Mittal <aditi.iitr@gmail.com>
Mon, 9 Sep 2013 16:22:00 +0000 (21:52 +0530)
mediagoblin/media_types/blog/__init__.py
mediagoblin/media_types/blog/forms.py

index a506ca5e943c6c44e15f08501cf44c0cf015cb96..609dbd1acbeade64de4b7d06689d4797a8a34a65 100644 (file)
@@ -69,7 +69,12 @@ def setup_plugin():
         #blog post draft view
         ('mediagoblin.media_types.blog.blogpost_draft_view', 
         '/u/<string:user>/b/<string:blog_slug>/p/<string:blog_post_slug>/draft/',
-        'mediagoblin.media_types.blog.views:draft_view')
+        'mediagoblin.media_types.blog.views:draft_view'
+        ),
+               #blog delete view
+               ('mediagoblin.media_types.blog.blog_delete', 
+        '/u/<string:user>/b/<string:blog_slug>/delete/',
+        'mediagoblin.media_types.blog.views:blog_delete')
         ]
             
             
index 9f595fcf518215b356e480e3facc653a0656a781..1cc41a02af2cba9df3cea5174f44b241aeba4332 100644 (file)
@@ -34,6 +34,10 @@ class BlogEditForm(wtforms.Form):
                [wtforms.validators.Length(min=0, max=500)])
     description = wtforms.TextAreaField(_('Description'))
     
+
+class ConfirmDeleteForm(wtforms.Form):
+    confirm = wtforms.BooleanField(
+        _('I am sure I want to delete this'))