title: Return context from class based view in django
body: <p>So if I used function views like so : </p>
  
  <pre><code>def messageView(request):
      webpages_list = AccessRecord.objects.order_by('date')
      date_dict = {'access_records':webpages_list}
      return render(request,'index.html',context=date_dict)
  </code></pre>
  
  <p>And my url resolver looks like this : <code>path('', views.messageView , name='index'),</code></p>
  
  <p>Every thing is fine, my records are displayed as expected :
  <a href="https://i.stack.imgur.com/VEZkA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VEZkA.png" alt="enter image description here"></a></p>
  
  <p>HOWEVER, when I try to use class based view like so : </p>
  
  <pre><code>class IndexView(CreateView):
      form_class = RegisterUserForm 
      template_name = "index.html"
  
      def index(self,request):
          webpages_list = AccessRecord.objects.order_by('date')
          date_dict = {'access_records':webpages_list}
  
          return render(request, self.template_name,context=date_dict )
  </code></pre>
  
  <p>And url is like so : <code>path('', views.IndexView.as_view(), name='index'),</code></p>
  
  <p>I get nothing in this case, I've tried looking for simple cases of just returning a context from a class view in django online, but to no avail.</p>
  
  <p>What exactly am I misunderstanding here please ?</p>