summaryrefslogtreecommitdiff
path: root/routes
diff options
context:
space:
mode:
authorBen Bangert <ben@groovie.org>2015-01-17 14:16:52 -0800
committerBen Bangert <ben@groovie.org>2015-01-17 14:16:52 -0800
commit4baf95808cbbab4db6ee2e6e9a54109b9b23a3f3 (patch)
tree4305f34de8f08f14c8db830311a1ad2efe825975 /routes
parentdcdb3f39a072dbb8fcc7bf8365be05af5ca4b4e1 (diff)
downloadroutes-4baf95808cbbab4db6ee2e6e9a54109b9b23a3f3.tar.gz
* Printing a mapper now includes the Controller/action parameters from the
route. Fixes #11.
Diffstat (limited to 'routes')
-rw-r--r--routes/mapper.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/routes/mapper.py b/routes/mapper.py
index 8979253..ea55cda 100644
--- a/routes/mapper.py
+++ b/routes/mapper.py
@@ -400,8 +400,9 @@ class Mapper(SubMapperParent):
else:
return ''
- table = [('Route name', 'Methods', 'Path')] + \
- [(r.name or '', format_methods(r), r.routepath or '')
+ table = [('Route name', 'Methods', 'Path', 'Controller', 'action')] + \
+ [(r.name or '', format_methods(r), r.routepath or '',
+ r.defaults.get('controller', ''), r.defaults.get('action', ''))
for r in self.matchlist]
widths = [max(len(row[col]) for row in table)