#NEWLINE# @ handle_response_format #NEWLINE# @ treeio_login_required #NEWLINE# @ module_admin_required ( ) #NEWLINE# def pagefolder_edit( request , folder_id , response_format = 'html' ) : #NEWLINE# #INDENT# 'Folder for Static Pages edit' #NEWLINE# folder = get_object_or_404 ( PageFolder , pk = folder_id ) #NEWLINE# if request . POST : #NEWLINE# #INDENT# form = PageFolderForm ( request . POST , instance = folder ) #NEWLINE# if form . is_valid ( ) : #NEWLINE# #INDENT# folder = form . save ( ) #NEWLINE# return HttpResponseRedirect ( reverse ( 'core_admin_pagefolder_view' , args = [ folder . id ] ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# form = PageFolderForm ( instance = folder ) #NEWLINE# #UNINDENT# return render_to_response ( 'core/administration/pagefolder_edit' , { #NEWLINE# #INDENT# 'folder' : folder , #NEWLINE# 'form' : form , #NEWLINE# #UNINDENT# } , context_instance = RequestContext ( request ) , response_format = response_format )