+# on start
+# moving the window from 1 ... to end
+# window size = 2, margin = 2
+# [1] 2 3 4 5 ... 15, 16
+# 1 [2] 3 4 5 ... 15, 16
+# 1 2 [3] 4 5 ... 15, 16
+# 1 2 3 [4] 5 6 ... 15, 16
+# 1 2 3 4 [5] 6 7 ... 15, 16
+# 1 2 3 4 5 [6] 7 8 ... 15, 16
+# 1 2 ... 5 6 [7] 8 9 ... 15, 16
+
+# window = 2 -> show 5 pages
+>>> p = Paginator(range(31), 2)
+>>> paginate({'paginator': p, 'page_obj': p.page(1)}, 2, 2)['pages']
+[1, 2, 3, 4, 5, None, 15, 16]
+
+>>> p = Paginator(range(31), 2)
+>>> paginate({'paginator': p, 'page_obj': p.page(2)}, 2, 2)['pages']
+[1, 2, 3, 4, 5, None, 15, 16]
+
+>>> p = Paginator(range(31), 2)
+>>> paginate({'paginator': p, 'page_obj': p.page(3)}, 2, 2)['pages']
+[1, 2, 3, 4, 5, None, 15, 16]
+
+>>> p = Paginator(range(31), 2)
+>>> paginate({'paginator': p, 'page_obj': p.page(4)}, 2, 2)['pages']
+[1, 2, 3, 4, 5, 6, None, 15, 16]
+
+>>> p = Paginator(range(31), 2)
+>>> paginate({'paginator': p, 'page_obj': p.page(5)}, 2, 2)['pages']
+[1, 2, 3, 4, 5, 6, 7, None, 15, 16]