#NEWLINE# @ register . simple_tag #NEWLINE# def admin_paginator_number( cl , i ) : #NEWLINE# #INDENT# '\n    Generates an individual page index link in a paginated list.\n\n    Wraps every entry in <li> tag comparing to regular Django pagination.\n    ' #NEWLINE# if ( i == DOT ) : #NEWLINE# #INDENT# return '<li>{}</li>' . format ( DOTS ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( i == cl . page_num ) : #NEWLINE# #INDENT# return format_html ( '<li class="current"><a href="#">{}</a></li> ' , ( cl + 1 ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return format_html ( '<li><a href="{}">{}</a></li> ' , cl . get_query_string ( { #NEWLINE# #INDENT# PAGE_VAR : i , #NEWLINE# #UNINDENT# } ) , ( i + 1 ) )