@handle_response_format
@treeio_login_required
@module_admin_required()
def pagefolder_delete(request, folder_id, response_format='html'):
 folder = get_object_or_404(PageFolder, pk=folder_id)
 pages = Page.objects.filter(folder=folder).order_by('name')
 if request.POST:
  if ('delete' in request.POST):
   folder.delete()
   return HttpResponseRedirect(reverse('core_admin_index_pages'))
  elif ('cancel' in request.POST):
   return HttpResponseRedirect(reverse('core_admin_pagefolder_view', args=[folder.id]))
 return render_to_response('core/administration/pagefolder_delete', {'folder': folder, 'pages': pages}, context_instance=RequestContext(request), response_format=response_format)

@ handle_response_format @ treeio_login_required @ module_admin_required ( ) def pagefolder_delete ( request , folder_id , response_format = 'html' ) : folder = get_object_or_404 ( PageFolder , pk = folder_id ) pages = Page . objects . filter ( folder = folder ) . order_by ( 'name' ) if request . POST : if ( 'delete' in request . POST ) : folder . delete ( ) return HttpResponseRedirect ( reverse ( 'core_admin_index_pages' ) ) elif ( 'cancel' in request . POST ) : return HttpResponseRedirect ( reverse ( 'core_admin_pagefolder_view' , args = [ folder . id ] ) ) return render_to_response ( 'core/administration/pagefolder_delete' , { 'folder' : folder , 'pages' : pages } , context_instance = RequestContext ( request ) , response_format = response_format )
folder for static pages delete .