]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/views/admin.py
OSQA-465, be able to embed YouTube videos. Adding a new setting to the View Settings...
[osqa.git] / forum / views / admin.py
index 724315f3410e38fff2fec870b1c163ac51303cb5..6dffa5120a9add77f5f1dc97d651da2512a14c08 100644 (file)
@@ -401,6 +401,12 @@ def edit_page(request, id=None):
     'published': published
     })
 
+@admin_page
+def delete_page(request, id=None):
+    page = get_object_or_404(Page, id=id)
+    page.delete()
+    return HttpResponseRedirect(reverse('admin_static_pages'))
+
 @admin_tools_page(_('createuser'), _("Create new user"))
 def create_user(request):
     if request.POST: