<select name="action">
<option selected="selected" value="">---------</option>
<option value="delete_selected">{% trans "Mark deleted" %}</option>
- <!--<option value="hard_delete_selected">{% trans "Delete completelly" %}</option>-->
+ <option value="hard_delete_selected">{% trans "Delete completelly" %}</option>
<option value="close_selected">{% trans "Close (questions only)" %}</option>
</select>
</label>
(_('act_at_asc'), pagination.SimpleSort(_('act_at_asc'), 'last_activity_at', "")),
), pagesizes=(default_pagesize,), force_sort='added_at', default_pagesize=default_pagesize, prefix=prefix)
-@admin_tools_page(_("nodeman"), _("Node management"))
+@admin_tools_page(_("nodeman"), _("Bulk management"))
def node_management(request):
if request.POST and "save_filter" in request.POST:
filter_name = request.POST.get('filter_name', _('filter'))
)
-def delete_docs(node):
- cursor = connection.cursor()
- cursor.execute("DELETE FROM forum_rootnode_doc WHERE node_id = %s" % (node.id))
-
- for n in node.children.all():
- delete_docs(n)
-
-
-#@decorate(Node.delete)
+@decorate(Node.delete)
def delete(origin, self, *args, **kwargs):
- delete_docs(self)
+ cursor = connection.cursor()
+ cursor.execute("DELETE FROM forum_rootnode_doc WHERE node_id = %s" % (self.id))
transaction.commit_unless_managed()
- origin(self, *args, **kwargs)
+ return origin(self, *args, **kwargs)