title: Django search "DoesNotExist"
body: <p>I'm using Django to build a website for a football club, which contains many blog articles. I'm trying to include a search bar, but I can't make it work. When submitting the search term, the following error is shown:</p>
  
  <blockquote>
    <p>DoesNotExist at /web/search/<br>
    Articulo matching query does not exist.</p>
  </blockquote>
  
  <p>Here is my code:</p>
  
  <h1>views.py<br></h1>
  
  <pre><code>def search(request):
      query = request.GET.get('q', '')
      if query:
          try:
              qset = (
                      Articulo(titulo__icontains=query) |
                      Articulo(cuerpo_icontains=query)
              )
              results = Articulo.objects.filter(qset).distinct()
          except Articulo.DoesNotExist:
              results = None
      else:
          results = []
      return render_to_response('web/buscar.html', {"results": results, "query": query})
  </code></pre>
  
  <p><br><br></p>
  
  <h1>index.html</h1>
  
  <pre><code>&lt;div id="busqueda" class="row"&gt;
      &lt;div class="col-md-12"&gt;
          &lt;span id="cruz" class="fas fa-times fa-2x"&gt;&lt;/span&gt;
          &lt;form method="GET" action="/web/search/" class="form my-2 my-lg-0"&gt;
              &lt;input id="searchBox" value="{{ query|escape }}" class="form-control mr-sm-2" type="text" name="q" placeholder="Buscar" aria-label="Buscar"&gt;
              &lt;button class="btn btn-outline-success my-2 my-sm-0" type="submit"&gt;Buscar&lt;/button&gt;
          &lt;/form&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <h1>urls.py</h1>
  
  <pre><code>url(r'^search/$', search),
  </code></pre>
  
  <h1>models.py</h1>
  
  <pre><code>class Articulo(models.Model):
      """Un artículo de la página"""
      id = models.AutoField(primary_key=True)
      titulo = models.CharField(max_length=100)
      slug = models.SlugField(unique=True, default="")
      CATEGORIAS = (
          ('Primera y Sub 21', 'Primera y Sub 21'),
          ('Inferiores', 'Inferiores'),
          ('Básquet', 'Básquet'),
          ('Hockey', 'Hockey'),
          ('Gurises', 'Gurises'),
          ('Generales', 'Generales'),
          ('Institucionales', 'Institucionales'),
          ('Senior', 'Senior'),
      )
      categoria = models.CharField(
          max_length=200,
          choices=CATEGORIAS
      )
      cuerpo = RichTextField()
      fecha_hora= models.DateTimeField()
      foto = models.ImageField()
      url_video = models.CharField(help_text='Url del video de facebook (opcional). Para obtener el link, ir al video, apretar donde están los 3 puntitos y poner "insertar". Pegar aquí solo el link del video, borrar el resto. Ejemplo: https://www.facebook.com/plugins/video.php?href=https%3A%2F%2Fwww.facebook.com%2FJuanCruzPiornoOficial%2Fvideos%2F302760100205413', max_length=500,blank=True)
      album_flickr = models.CharField(help_text="Subir fotos a Flickr, crear un álbum, compartirlo eligiendo la opción 'Insertar', elegir el tamaño más grande, y pegar el link aquí", max_length=700, blank=True)
      def save(self, *args, **kwargs):
          self.slug = slugify(self.titulo)
  
          super(Articulo, self).save(*args, **kwargs)
  
      def __str__(self):
          return self.titulo
  </code></pre>