title: Django class based view not returning current user details
body: <p>I am calling the class based view </p>
  
  <pre><code>class CurrentUser(APIView):
      authentication_classes = (authentication.TokenAuthentication,)
      def get(self, request, format=None):
          for user in User.objects.all()
              if request.user.is_authenticated():
                  fullname = get_full_name(user)
                  return Response(fullname)
  </code></pre>
  
  <p>from the url</p>
  
  <pre><code>url(r'^currentuser$', views.CurrentUser.as_view(), name='current-user'
  </code></pre>
  
  <p>But it is returning error as follows..</p>
  
  <p>NameError at /currentuser
  global name 'get_full_name' is not defined</p>