danieldaeschle / swapy

Easy and modular web development

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

All registered URLs

opened this issue · comments


  • Bug
  • Feature
  • Question
  • Documentation issue


A method to get all registered URLs.
I already implemented something based on the Source Code I've read.

def all_urls():
    return list(map(str, state('__main__').url_map.iter_rules()))

Just use state(__name__).routes.keys() ??

Make it easier accesible?

All routes isn't something which is important often. Why it should be accessable with routes() (.keys()) instead of state(__name__).routes (.keys())?