

@treeio_login_required
@handle_response_format
def user_perspective(request, response_format='html'):
    'Change user perspective'
    user = request.user.profile
    if (request.POST and ('core_perspective' in request.POST)):
        id = request.POST['core_perspective']
        perspective = get_object_or_404(Perspective, pk=id)
        if user.has_permission(response_format):
            user.set_perspective(perspective)
    return HttpResponseRedirect(reverse('home'))

dataset/ETHPy150Open treeio/treeio/treeio/core/views.py user_perspective/VarMisuse@72/109 `perspective`->`response_format`