@handle_response_format
@treeio_login_required
@module_admin_required()
def page_edit(request, page_id, response_format='html'):
 page = get_object_or_404(Page, pk=page_id)
 if request.POST:
  form = PageForm(request.POST, instance=page)
  if form.is_valid():
   page = form.save()
   return HttpResponseRedirect(reverse('core_admin_page_view', args=[page.id]))
 else:
  form = PageForm(instance=page)
 return render_to_response('core/administration/page_edit', {'page': page, 'form': form}, context_instance=RequestContext(request), response_format=response_format)

@ handle_response_format @ treeio_login_required @ module_admin_required ( ) def page_edit ( request , page_id , response_format = 'html' ) : page = get_object_or_404 ( Page , pk = page_id ) if request . POST : form = PageForm ( request . POST , instance = page ) if form . is_valid ( ) : page = form . save ( ) return HttpResponseRedirect ( reverse ( 'core_admin_page_view' , args = [ page . id ] ) ) else : form = PageForm ( instance = page ) return render_to_response ( 'core/administration/page_edit' , { 'page' : page , 'form' : form } , context_instance = RequestContext ( request ) , response_format = response_format )
static page edit .