@jingo.register.function
def showing(query, pager):
 format_opts = (pager.start_index(), pager.end_index(), pager.paginator.count)
 query = escape(query)
 if query:
  showing = _(u'Showing {0} - {1} of {2} results for <strong>{3}</strong>').format(*(format_opts + (query,)))
 else:
  showing = _(u'Showing {0} - {1} of {2} results').format(*format_opts)
 return jinja2.Markup(showing)

@ jingo . register . function def showing ( query , pager ) : format_opts = ( pager . start_index ( ) , pager . end_index ( ) , pager . paginator . count ) query = escape ( query ) if query : showing = _ ( u'Showing {0} - {1} of {2} results for <strong>{3}</strong>' ) . format ( * ( format_opts + ( query , ) ) ) else : showing = _ ( u'Showing {0} - {1} of {2} results' ) . format ( * format_opts ) return jinja2 . Markup ( showing )
writes a string that tells the user what they are seeing in terms of search results .