diff --git a/categories/templates/branches/show.html b/categories/templates/branches/show.html
index 2bf5aed..1bac4fa 100644
--- a/categories/templates/branches/show.html
+++ b/categories/templates/branches/show.html
@@ -5,5 +5,18 @@
Description
{{ branch.description }}
Songs
- {% include 'components/song-table.html' with songs=songs %}
+ {% include 'components/song-table.html' with songs=page_obj %}
+
{% endblock %}
\ No newline at end of file
diff --git a/categories/views.py b/categories/views.py
index 37a388e..f7e2085 100644
--- a/categories/views.py
+++ b/categories/views.py
@@ -1,3 +1,4 @@
+from django.core.paginator import Paginator
from django.shortcuts import render
from django.http import HttpResponse
from .models import Branch, Category
@@ -20,4 +21,7 @@ def branch_index(request):
def branch_show(request, acronym):
branch = Branch.objects.filter(acronym=acronym)[0]
songs = Song.objects.filter(branch=branch)
- return render(request,"branches/show.html",{'branch':branch,'songs':songs})
\ No newline at end of file
+ paginator = Paginator(songs, 100)
+ page_number = request.GET.get('page',1)
+ page_obj = paginator.get_page(page_number)
+ return render(request,"branches/show.html",{'branch':branch,'page_obj':page_obj})
\ No newline at end of file