#NEWLINE# @ handle_response_format #NEWLINE# @ treeio_login_required #NEWLINE# @ module_admin_required ( ) #NEWLINE# def page_add( request , response_format = 'html' ) : #NEWLINE# #INDENT# 'Static Page add' #NEWLINE# if request . POST : #NEWLINE# #INDENT# form = PageForm ( request . POST ) #NEWLINE# if form . is_valid ( ) : #NEWLINE# #INDENT# page = form . save ( ) #NEWLINE# return HttpResponseRedirect ( reverse ( 'core_admin_page_view' , args = [ page . id ] ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# form = PageForm ( ) #NEWLINE# #UNINDENT# return render_to_response ( 'core/administration/page_add' , { #NEWLINE# #INDENT# 'form' : form , #NEWLINE# #UNINDENT# } , context_instance = RequestContext ( request ) , response_format = response_format )