title: django template print out by filter id value
body: <p>I want to print value by <code>id</code> in database,And don't know which keywords to find in Google.<br>
  in my <code>views.py</code>, I send  <code>transen = TransEn.objects.all()</code> to <code>template</code></p>
  
  <p>and this will print all datas from database:</p>
  
  <pre><code>{% for words in transen %}
  {{words.words|safe }}
  {% endfor %}
  </code></pre>
  
  <p>But I want to print by the value of the id  Like:<br>
  (Because they are words in English for translating website) 
  I don't know how to write this in template, please guide me, Thank you very much.</p>
  
  <pre><code>&lt;div&gt;&lt;span&gt;  TransEn.objects.filter(id='2') &lt;/span&gt;&lt;/div&gt; 
  &lt;div&gt; TransEn.objects.filter(id='3') &lt;/div&gt; 
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/Wws0x.png" alt="enter image description here"></p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>I have found a method:</p>
  
  <p>I can use <code>if</code> tag, but are there another ideas??</p>
  
  <pre><code>&lt;div&gt;
      {% for words in transen %}
          {% if words.id == 2 %}
               {{ words.words|safe }}
          {% endif %}
      {% endfor %}
  &lt;/div&gt;
  &lt;div&gt;
      {% for words in transen %}
          {% if words.id == 3 %}
              {{ words.words|safe }}
          {% endif %}
      {% endfor %}
  &lt;/div&gt;
  </code></pre>