@register.simple_tag
def paginator_number(cl,i):
    """
    Generates an individual page index link in a paginated list.
    """
    if i == DOT:
        return '... '
    elif i == cl.page_num:
        return format_html('<span class="this-page">{0}</span> ', i+1)
    else:
        return format_html('<a href="{0}"{1}>{2}</a> ',
                           cl.get_query_string({PAGE_VAR: i}),
                           mark_safe(' class="end"' if i == cl.paginator.num_pages-1 else ''),
                           i+1)
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/contrib/admin/templatetags/admin_list.py/paginator_number/original