@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
dataset/ETHPy150Open treeio/treeio/treeio/account/views.py/account_edit