Skip to content

Commit

Permalink
RoutesList: Do not show debugtoolbar routes
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian authored and jeffwidman committed Feb 18, 2020
1 parent ad84729 commit 4964ae2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion flask_debugtoolbar/panels/route_list.py
Expand Up @@ -26,7 +26,11 @@ def nav_subtitle(self):
return '%s %s' % (count, 'route' if count == 1 else 'routes')

def process_request(self, request):
self.routes = list(current_app.url_map.iter_rules())
self.routes = [
rule
for rule in current_app.url_map.iter_rules()
if not rule.rule.startswith('/_debug_toolbar')
]

def content(self):
return self.render('panels/route_list.html', {
Expand Down

0 comments on commit 4964ae2

Please sign in to comment.