Mercurial > piecrust2
comparison piecrust/commands/builtin/info.py @ 792:58ebf50235a5
routing: Simplify how routes are defined.
* No more declaring the type of route parameters -- the sources and generators
already know what type each parameter is supposed to be.
* Same for variadic parameters -- we know already.
* Update cache version to force a clear reload of the config.
* Update tests.
TODO: simplify code in the `Route` class to use source or generator transparently.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Wed, 07 Sep 2016 08:58:41 -0700 |
parents | f6f9a284a5f3 |
children | 4850f8c21b6e |
comparison
equal
deleted
inserted
replaced
791:504d6817352d | 792:58ebf50235a5 |
---|---|
83 logger.info(" source: %s" % (route.source_name or '')) | 83 logger.info(" source: %s" % (route.source_name or '')) |
84 logger.info(" generator: %s" % (route.generator_name or '')) | 84 logger.info(" generator: %s" % (route.generator_name or '')) |
85 logger.info(" regex: %s" % route.uri_re.pattern) | 85 logger.info(" regex: %s" % route.uri_re.pattern) |
86 logger.info(" function: %s(%s)" % ( | 86 logger.info(" function: %s(%s)" % ( |
87 route.func_name, | 87 route.func_name, |
88 ', '.join(route.func_parameters))) | 88 ', '.join(route.uri_params))) |
89 | 89 |
90 | 90 |
91 class ShowPathsCommand(ChefCommand): | 91 class ShowPathsCommand(ChefCommand): |
92 def __init__(self): | 92 def __init__(self): |
93 super(ShowPathsCommand, self).__init__() | 93 super(ShowPathsCommand, self).__init__() |