title: How do I post the first value of a query set in HTML?
body: <p>Hey guys I need to post the first value of a query set in HTML. Currently, I'm iterating through the entire query site and printing out every match but I don't want that.  I'm using Django and I use the objects.get() filter which I thought only grabs one record but it is grabbing multiple.</p>
  <p>I just want it to grab the category they were just in so after they make a post, they can easily return back to that categories forum page.</p>
  <p>How do I print it out in HTML or how do I do the Django query to only get one record so I can easily just display that in HTML?</p>
  <p>Thanks!
  HTML:</p>
  <pre><code>{% for query in queries %}
     &lt;h4&gt;Return to the &lt;a href=&quot;/movies&quot;&gt;{{query.category}}&lt;/a&gt; Forum&lt;/h4&gt;
     {% endfor %}
  </code></pre>
  <p>views.py:</p>
  <pre><code>query = NewPost.objects.get(category = category)
  return render(request, &quot;network/posted.html&quot;, {&quot;queries&quot;: query})
  </code></pre>