def user_detail(request, username):
 detail_user = get_object_or_404(User, username=username)
 if (detail_user.active_ban and (not request.user.has_perm('users.add_userban'))):
  return render(request, '403.html', {'reason': 'bannedprofile'}, status=403)
 context = {'detail_user': detail_user}
 return render(request, 'users/user_detail.html', context)

def user_detail ( request , username ) : detail_user = get_object_or_404 ( User , username = username ) if ( detail_user . active_ban and ( not request . user . has_perm ( 'users.add_userban' ) ) ) : return render ( request , '403.html' , { 'reason' : 'bannedprofile' } , status = 403 ) context = { 'detail_user' : detail_user } return render ( request , 'users/user_detail.html' , context )
the main user view that only collects a bunch of user specific data to populate the template context .