title: Attribute Error when running Django DetailView
body: <pre><code>class results(DetailView):
      model = Location
      template_name = 'results.html'
  
      def get_object(self, **kwargs):
          context = super(results, self).get_context_data(**kwargs)
          query = self.request.GET.get('q')
  
          context.update({
              'location': Location.objects.filter(name__icontains=query)
          })
  
          return context
  </code></pre>
  <p>The above function aims at getting the user's input string and display it in <code>DetailView</code> after filtering. However, when I run it, the following error message is generated:</p>
  <pre><code>AttributeError at /collector/results/
  'results' object has no attribute 'object'
  Request Method: GET
  Request URL:    http://127.0.0.1:8000/collector/results/?q=Hong+Kong
  Django Version: 3.1.7
  Exception Type: AttributeError
  Exception Value:    
  'results' object has no attribute 'object'
  </code></pre>
  <p>Do anyone know what causes the error, and how to fix the code?</p>