title: Display models that includes certain values (basic search)
body: <p>I must start by saying that I am VERY new to Django (Python I know :) ).</p>
  
  <p>Let me show you what I have so far and then I'll get into the issue.</p>
  
  <p>The <code>model</code>:</p>
  
  <pre><code>class Machine(models.Model):
      name = models.CharField(max_length=255, primary_key=True)
      user = models.CharField(max_length=255)
      mail = models.CharField(max_length=255)
      datetime = models.DateTimeField(blank=True, null=True, default="")
      licenses = models.CharField(max_length=10000, blank=True, null=True, default="")
  </code></pre>
  
  <p>The <code>view</code>:</p>
  
  <pre><code>def home(request):
      ...
      return render_to_response("inventory/home.html", {'machines': Machine.objects.all()})
  </code></pre>
  
  <p>and here is part of my <code>HTML</code>:</p>
  
  <pre><code>&lt;fieldset class="module aligned "&gt;
      &lt;div class="form-row field-name"&gt;
          &lt;div&gt;
              &lt;label class="required" for="id_name"&gt;License:&lt;/label&gt;
              &lt;input class="vTextField" id="id_license" maxlength="255" name="license" type="text" value=""&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/fieldset&gt;
  
  
  &lt;div class=results&gt;
      &lt;table width="100%" border="1" cellpadding="4"  cellspacing="0" bordercolor="#eeeeee"&gt;
          &lt;tr bgcolor='WhiteSmoke' style="color: 'black'"&gt;
              &lt;td&gt;&lt;input type="checkbox" id="action-toggle" style="display: inline-block;"&gt;&lt;/td&gt;
              &lt;td&gt;Name&lt;/td&gt;
              &lt;td&gt;User&lt;/td&gt;
              &lt;td&gt;Mail&lt;/td&gt;
              &lt;td&gt;Registration date&lt;/td&gt;
              &lt;td&gt;Registered licenses&lt;/td&gt;
          &lt;/tr&gt;
  
          {% for machine in machines %}
              {% if machine.datetime %}
          &lt;tr bgcolor='CCFF66'&gt;
              {% else %}
          &lt;tr bgcolor='FF6666'&gt;
              {% endif %}
  
              &lt;td class="action-checkbox"&gt;
                  &lt;input class="action-select" name="_selected_action" type="checkbox" value="{{machine.name}}"&gt;
              &lt;/td&gt;
              &lt;td&gt;{{ machine.name }}&lt;/td&gt;
              &lt;td&gt;{{ machine.user }}&lt;/td&gt;
              &lt;td&gt;{{ machine.mail }}&lt;/td&gt;
              &lt;td&gt;{{ machine.datetime|default:"N/A" }}&lt;/td&gt;
              &lt;td&gt;{{ machine.licenses|default:"N/A"|truncatewords:"5" }}&lt;/td&gt;
  
          &lt;/tr&gt;
          {% endfor %}
      &lt;/table&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Here is the result:
  <img src="https://i.stack.imgur.com/mmQPm.png" alt="enter image description here"></p>
  
  <p>As you can see above, currently <strong>all</strong> items (called machines) are being displayed but I would like to present <strong>only the machines with a certain license text</strong>.</p>
  
  <p>So <strong>as soon as</strong> user starts typing into "license search field" only the items with that license would show up (I hope I have managed to explain the issue well enough).</p>
  
  <p>At this point I don't really know where to start looking! I check some django tutorial but they don't get into stuff maybe this advanced!</p>