def handle_page_crumb(func):
 @wraps(func)
 def wrapper(path, model, page, root_name):
  path = PAGE_REGEXP.sub('', path)
  breadcrumbs = func(path, model, root_name)
  if page:
   if (page.number > 1):
    breadcrumbs[(-1)].url = path
    page_crumb = Crumb((_('Page %s') % page.number))
    breadcrumbs.append(page_crumb)
  return breadcrumbs
 return wrapper

def handle_page_crumb ( func ) : @ wraps ( func ) def wrapper ( path , model , page , root_name ) : path = PAGE_REGEXP . sub ( '' , path ) breadcrumbs = func ( path , model , root_name ) if page : if ( page . number > 1 ) : breadcrumbs [ ( - 1 ) ] . url = path page_crumb = Crumb ( ( _ ( 'Page %s' ) % page . number ) ) breadcrumbs . append ( page_crumb ) return breadcrumbs return wrapper
decorator for handling the current page in the breadcrumbs .