From 5d9ecb05ddb843c6b562111ae9f5d048849f11bd Mon Sep 17 00:00:00 2001 From: Aditi Mittal Date: Mon, 9 Sep 2013 21:52:00 +0530 Subject: [PATCH] Add ConfirmDeleteForm and URL mapping for blog_delete view --- mediagoblin/media_types/blog/__init__.py | 7 ++++++- mediagoblin/media_types/blog/forms.py | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/mediagoblin/media_types/blog/__init__.py b/mediagoblin/media_types/blog/__init__.py index a506ca5e..609dbd1a 100644 --- a/mediagoblin/media_types/blog/__init__.py +++ b/mediagoblin/media_types/blog/__init__.py @@ -69,7 +69,12 @@ def setup_plugin(): #blog post draft view ('mediagoblin.media_types.blog.blogpost_draft_view', '/u//b//p//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//b//delete/', + 'mediagoblin.media_types.blog.views:blog_delete') ] diff --git a/mediagoblin/media_types/blog/forms.py b/mediagoblin/media_types/blog/forms.py index 9f595fcf..1cc41a02 100644 --- a/mediagoblin/media_types/blog/forms.py +++ b/mediagoblin/media_types/blog/forms.py @@ -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')) -- 2.25.1