@handle_response_format
@treeio_login_required
def account_edit(request, response_format='html'):
 profile = request.user.profile
 if request.POST:
  form = AccountForm(request.POST, instance=profile)
  if form.is_valid():
   form.save()
   return HttpResponseRedirect(reverse('account_view'))
 else:
  form = AccountForm(instance=profile)
 return render_to_response('account/account_edit', {'profile': profile, 'form': Markup(form.as_ul())}, context_instance=RequestContext(request), response_format=response_format)

@ handle_response_format @ treeio_login_required def account_edit ( request , response_format = 'html' ) : profile = request . user . profile if request . POST : form = AccountForm ( request . POST , instance = profile ) if form . is_valid ( ) : form . save ( ) return HttpResponseRedirect ( reverse ( 'account_view' ) ) else : form = AccountForm ( instance = profile ) return render_to_response ( 'account/account_edit' , { 'profile' : profile , 'form' : Markup ( form . as_ul ( ) ) } , context_instance = RequestContext ( request ) , response_format = response_format )
account edit page .