title: class view error "name 'context' is not defined" when passing model to template
body: <p>I am trying to access model data in a template using the view class method (that I have done before), however the "NameError: name 'context' is not defined" continues to arise.</p>
  
  <pre><code>from django.views.generic import TemplateView
  from django.shortcuts import render, redirect
  from .models import Email
  
  class MapView(TemplateView):
      template_name = 'Map/map.html'
      email = Email.objects.all()
      context = {'email': email}
  
      def get(self, request):
          return render(request, self.template_name, context)
  </code></pre>
  
  <p>if I replace "context" with an empty dictionary "{}" then I can display the template, but even if i declare "context = {}" and try to return "render(request, self.template_name, context)" I still get the context is not defined error.</p>