diff --git a/apimanager/consumers/templates/consumers/includes/filter_pagination.html b/apimanager/consumers/templates/consumers/includes/filter_pagination.html
new file mode 100644
index 0000000..7736ca1
--- /dev/null
+++ b/apimanager/consumers/templates/consumers/includes/filter_pagination.html
@@ -0,0 +1,12 @@
+{% load i18n %}
+
\ No newline at end of file
diff --git a/apimanager/consumers/templates/consumers/index.html b/apimanager/consumers/templates/consumers/index.html
index 20bb14b..8f31a45 100644
--- a/apimanager/consumers/templates/consumers/index.html
+++ b/apimanager/consumers/templates/consumers/index.html
@@ -44,6 +44,13 @@
+
+
+
{% trans "Pagination" %}
+ {% include "consumers/includes/filter_pagination.html" %}
+
+
+
{% trans "Statistics" %}
- {% trans "Total number of consumers" %}: {{ statistics.consumers_num }}
diff --git a/apimanager/consumers/views.py b/apimanager/consumers/views.py
index 6b53914..9e43f7e 100644
--- a/apimanager/consumers/views.py
+++ b/apimanager/consumers/views.py
@@ -69,7 +69,9 @@ class IndexView(LoginRequiredMixin, TemplateView):
sorted_consumers=[]
api = API(self.request.session.get('obp'))
try:
- urlpath = '/management/consumers'
+ limit = self.request.GET.get('limit', 50)
+ offset = self.request.GET.get('offset', 0)
+ urlpath = '/management/consumers?limit={}&offset={}'.format(limit, offset)
consumers = api.get(urlpath)
if 'code' in consumers and consumers['code'] >= 400:
messages.error(self.request, consumers['message'])
@@ -86,6 +88,8 @@ class IndexView(LoginRequiredMixin, TemplateView):
context.update({
'consumers': sorted_consumers,
+ 'limit': limit,
+ 'offset': offset,
'statistics': self.compile_statistics(consumers),
})
except APIError as err: