diff --git a/blog/templatetags/pagination_filters.py b/blog/templatetags/pagination_filters.py index b36cd81..791565d 100644 --- a/blog/templatetags/pagination_filters.py +++ b/blog/templatetags/pagination_filters.py @@ -5,11 +5,11 @@ register = template.Library() def truncate(paginator, number): if number < 5: - truncated_paginator = xrange(1, min(paginator+1, number+3)) + truncated_paginator = range(1, min(paginator+1, number+3)) elif number > 4 and number < (paginator-3): - truncated_paginator = xrange(number-3, number+3) + truncated_paginator = range(number-3, number+3) else: - truncated_paginator = xrange(number-3, paginator+1) + truncated_paginator = range(number-3, paginator+1) return truncated_paginator register.filter('truncate', truncate)