Mercurial > piecrust2
comparison piecrust/commands/builtin/info.py @ 731:dafb7d76c2ba
routes: Show the route template function.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Wed, 01 Jun 2016 22:11:05 -0700 |
parents | ab5c6a8ae90a |
children | f9d926669d7a |
comparison
equal
deleted
inserted
replaced
730:8c3c2b949b82 | 731:dafb7d76c2ba |
---|---|
82 for route in ctx.app.routes: | 82 for route in ctx.app.routes: |
83 logger.info("%s:" % route.uri_pattern) | 83 logger.info("%s:" % route.uri_pattern) |
84 logger.info(" source: %s" % (route.source_name or '')) | 84 logger.info(" source: %s" % (route.source_name or '')) |
85 logger.info(" generator: %s" % (route.generator_name or '')) | 85 logger.info(" generator: %s" % (route.generator_name or '')) |
86 logger.info(" regex: %s" % route.uri_re.pattern) | 86 logger.info(" regex: %s" % route.uri_re.pattern) |
87 logger.info(" function: %s(%s)" % ( | |
88 route.template_func_name, | |
89 ', '.join(route.template_func_args))) | |
87 | 90 |
88 | 91 |
89 class ShowPathsCommand(ChefCommand): | 92 class ShowPathsCommand(ChefCommand): |
90 def __init__(self): | 93 def __init__(self): |
91 super(ShowPathsCommand, self).__init__() | 94 super(ShowPathsCommand, self).__init__() |