@treeio_login_required
@handle_response_format
def user_perspective(request, response_format='html'):
 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(perspective):
   user.set_perspective(perspective)
 return HttpResponseRedirect(reverse('home'))

@ treeio_login_required @ handle_response_format def user_perspective ( request , response_format = 'html' ) : 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 ( perspective ) : user . set_perspective ( perspective ) return HttpResponseRedirect ( reverse ( 'home' ) )
change user perspective .