diff --git a/topologie/templates/topologie/aff_chambres.html b/topologie/templates/topologie/aff_chambres.html
index 5236a301..d3393fc2 100644
--- a/topologie/templates/topologie/aff_chambres.html
+++ b/topologie/templates/topologie/aff_chambres.html
@@ -22,6 +22,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
{% endcomment %}
+{% if room_list.paginator %}
+{% include "pagination.html" with list=room_list %}
+{% endif %}
+
diff --git a/topologie/templates/topologie/index_room.html b/topologie/templates/topologie/index_room.html
index e17a77c1..bff4b1c2 100644
--- a/topologie/templates/topologie/index_room.html
+++ b/topologie/templates/topologie/index_room.html
@@ -31,6 +31,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
Chambres
{% if is_infra %}
Ajouter une chambre
+
{% endif %}
{% include "topologie/aff_chambres.html" with room_list=room_list %}
diff --git a/topologie/views.py b/topologie/views.py
index d9bd849f..974ca511 100644
--- a/topologie/views.py
+++ b/topologie/views.py
@@ -105,6 +105,18 @@ def index_port(request, switch_id):
@permission_required('cableur')
def index_room(request):
room_list = Room.objects.order_by('name')
+ options, created = GeneralOption.objects.get_or_create()
+ pagination_number = options.pagination_number
+ paginator = Paginator(room_list, pagination_number)
+ page = request.GET.get('page')
+ try:
+ room_list = paginator.page(page)
+ except PageNotAnInteger:
+ # If page is not an integer, deliver first page.
+ room_list = paginator.page(1)
+ except EmptyPage:
+ # If page is out of range (e.g. 9999), deliver last page of results.
+ room_list = paginator.page(paginator.num_pages)
return render(request, 'topologie/index_room.html', {'room_list': room_list})
@login_required