@treeio_login_required
@handle_response_format
def user_perspective(request, response_format='html'):
    "Change user perspective"

    user = request.user.profile
    if request.POST or 'core_perspective' in request.POST:
        id = request.POST['core_perspective']
        perspective = get_object_or_404(Perspective, pk=id)
        if user.has_permission(perspective):
            user.set_perspective(perspective)

    return HttpResponseRedirect(reverse('home'))
dataset/ETHPy150Open treeio/treeio/treeio/core/views.py/user_perspective/operator `and` -> `or`