title: How to create multiple pages if there were too many for one page?
body: <p>I'm working on a django project trying to create a forum. Now when a certain number of objects (thread-previews) is reached on one page, I want a second (and then third page etc) page created and some of these objects should go to these next pages (page 2, then page 3 etc.) and the url for the second page should be something like &quot;mysite.com/fourum/topic/2&quot; and so on.</p>
  <p>And then there have to be some buttons to navigate to page 2, page 3 etc.</p>
  <p>This would be relevant code:</p>
  <p>gaming.html</p>
  <pre class="lang-html prettyprint-override"><code>{% extends &quot;forum/index.html&quot; %}
  {% load static %}
  {% block title %} Gaming {% endblock %}
  
  {% block content %}
  
  &lt;div class=&quot;main-container&quot;&gt;
      &lt;h1 class=&quot;heading&quot;&gt;Forum: Gaming&lt;/h1&gt;
      {% for obj in object %}
          &lt;div class=&quot;username&quot;&gt;{{obj.username}}&lt;/div&gt;
          &lt;div class=&quot;date&quot;&gt;{{obj.date}}&lt;/div&gt;
          &lt;div class=&quot;topic&quot;&gt;{{obj.topic}}&lt;/div&gt;
          &lt;div class=&quot;title&quot;&gt;&lt;a class=&quot;link&quot; href=&quot;{{obj.slug_titel}}&quot;&gt;{{obj.title}}&lt;/a&gt;&lt;/div&gt;
          &lt;div class=&quot;content&quot;&gt;{{obj.content}}&lt;/div&gt;
      {% endfor %}
  &lt;/div&gt;
  
  {% endblock %}
  
  </code></pre>
  <p>views.py</p>
  <pre class="lang-py prettyprint-override"><code>def gaming(request):
      obj = Threads.objects.filter(topic=&quot;gaming&quot;)
      context = {
          &quot;object&quot;: obj,
      }
      return render(request, &quot;forum/gaming.html&quot;, context)
  
  </code></pre>