#NEWLINE# @ handle_response_format #NEWLINE# @ treeio_login_required #NEWLINE# @ module_admin_required ( ) #NEWLINE# def page_delete( request , page_id , response_format = 'html' ) : #NEWLINE# #INDENT# 'Static Page delete' #NEWLINE# page = get_object_or_404 ( Page , pk = page_id ) #NEWLINE# if request . POST : #NEWLINE# #INDENT# if ( 'delete' in request . POST ) : #NEWLINE# #INDENT# page . delete ( ) #NEWLINE# return HttpResponseRedirect ( reverse ( 'core_admin_index_pages' ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( 'cancel' in request . POST ) : #NEWLINE# #INDENT# return HttpResponseRedirect ( reverse ( 'core_admin_page_view' , args = [ page . id ] ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return render_to_response ( 'core/administration/page_delete' , { #NEWLINE# #INDENT# 'page' : page , #NEWLINE# #UNINDENT# } , context_instance = RequestContext ( request ) , response_format = response_format )