title: How to get First 4 object from Django Queryset
body: <p>I want the first four Objects from a Django Database Queryset !! I am trying to do that by slicing it like this [:4] <code>song = Song.objects.all()[:4]</code> but it is not working it is taking all the querysets.</p>
  <p>Whole Code:-</p>
  <pre><code>def index(request):
      song = Song.objects.all()
      return render(request, 'musicbeats/index.htm', {'song': song})
  </code></pre>
  <p>HTML code:-</p>
  <pre><code>  {% for i in song %}
      &lt;div style=&quot;padding-left: 2%; padding-top: 1%;&quot;&gt;
      &lt;div class=&quot;card&quot; style=&quot;width: 18rem;&quot;&gt;
      &lt;h5 class=&quot;card-title&quot;&gt;{{i.name}}&lt;/h5&gt;
      &lt;/div&gt;
      &lt;/div&gt;
    {% endfor %}
  </code></pre>