title: Exception Value: Cannot use None as a query value Django Framework
body: <p>Help required, please.
  I'm doing a level 6 Diploma in Software Development. Right now I'm doing a project that requires a gym app to be built.
  We've decided on using Python/Django as our language/framework.</p>
  <p>I have my models, urls, views, and templates working thus far. (Videos display and its own page)
  However, I need to implement a search bar to search both video content and text context within the app.
  I have the video model set up in /admin. migrations are done.
  Do I need another model to search for normal content in my app?
  The search bar is in my base.html template.</p>
  <p>I want to use the search bar to do a query and pass the results onto a results template page
  which extends base.html.
  The error I get is the below;</p>
  <p>Exception Type: ValueError
  Exception Value: Cannot use None as a query value</p>
  <p>Can someone point me in the right direction? photos of code attached.</p>
  <p>base.html</p>
  <pre><code>&lt;!-- Navbar Right Side --&gt;
  &lt;div class=&quot;navbar-nav&quot;&gt;
      &lt;form class=&quot;form-inline my-1 my-lg-0&quot; action=&quot;{% url 'search_results' %}&quot; method=&quot;get&quot;&gt;
          &lt;input name=&quot;q&quot; type=&quot;text&quot; placeholder=&quot;Search&quot; aria-label=&quot;Search&quot;&gt;
          &lt;a class=&quot;btn btn-secondary my-2 my-sm-0&quot; href='/gymapp/videos/' type=submit&gt;Search&lt;/a&gt;
      &lt;/form&gt;
          &lt;a class=&quot;nav-item nav-link&quot; href=&quot;#&quot;&gt;Login&lt;/a&gt;
          &lt;a class=&quot;nav-item nav-link&quot; href=&quot;/register&quot;&gt;Register&lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  <p>search_results.html</p>
  <pre><code>{% extends &quot;gymapp/base.html&quot; %}
  {% load embed_video_tags %}
  {% block content %}
      {% for i in obj %}
          {% video i.video 'tiny' %}
              &lt;ul class=&quot;list-unstyled mt-3 mb-4&quot;&gt;
                  &lt;li&gt;Name: {{ i.video_name }}&lt;/li&gt;
                 &lt;li&gt;Description: {{ i.content }}&lt;/li&gt;
              &lt;/ul&gt;
      {% endfor %}
  {% endblock content %}
  </code></pre>
  <p>urls.py</p>
  <pre><code>path('videos/', VideoResultsView.as_view(), name='search_results'),
  </code></pre>
  <p>models.py</p>
  <pre><code>from django.db import models
  from embed_video.fields import EmbedVideoField
  
  
  class Video(models.Model):
      category = models.CharField(max_length=200)
      video_name = models.CharField(max_length=200)
      content = models.CharField(max_length=500)
      video = EmbedVideoField()  # same like models.URLField()
      stats = models.CharField(max_length=20)
  
  
      class Meta:
          verbose_name_plural = 'videos'
  
      def __str__(self):
          return self.category
  </code></pre>
  <p>views.py</p>
  <pre><code>class VideoResultsView(ListView):
      model = Video
      template_name = 'search_results.html'
  
      def get_queryset(self):
          query = self.request.GET.get('q')
          video_list = Video.objects.filter(
              Q(category__icontains=query) | Q(video_name__icontains=query)
          )
          return video_list
  </code></pre>
  <p>Hoping someone can point me in the right direction. <a href="https://i.stack.imgur.com/4aiii.png" rel="nofollow noreferrer">Error Description</a></p>