title: Access request.user in Django Classed Based Generic View
body: <p>How can I access request.user inside a Classed Based Generic View? </p>
  
  <p>This is the code:</p>
  
  <pre><code>class TodayView(TemplateView):
      template_name = "times/today.html"
      if Records.objects.all().count() &gt; 0:
          last_record = Records.objects.latest('id')
      else:
          last_record = None
      actual_time = datetime.today()
      activities = Activity.objects.filter(owner=request.user)
  
      def get_context_data(self, **kwargs):
          context = super(TodayView, self).get_context_data(**kwargs)
          context["today"] = self.actual_time
  
          return context
  </code></pre>
  
  <p>Right now, I get the error "request is not defined", if I write "self.request.user", I get "self" is not defined, which is understandable. I can think of a couple of ways to solve this but I want to know if there is a standardized/consensus on how to access request.user on Django Classed Based Generic Views. </p>