FTR, that's a very old copy of the docs; the "right" ones are at
http://docs.pylonsproject.org/docs/pyramid.html
> When I try this I get the action, but not the ext. Is this a bug in
> route matching, the documentation, or my understanding?
Here's an example program. When you put this in a file (as e.g.
matching.py) and run it:
- /bar will show you an empty dict to your browser
- /something.foo will show you a nonempty dict including the extension
from pyramid.config import Configurator
from pyramid.view import view_config
from paste.httpserver import serve
@view_config(route_name='foo', renderer='string')
def foo(request):
return request.matchdict
@view_config(route_name='bar', renderer='string')
def bar(request):
return request.matchdict
if __name__ == '__main__':
config = Configurator()
config.add_route('foo', '/{name}.{ext}')
config.add_route('bar', '/bar')
config.scan('__main__')
app = config.make_wsgi_app()
serve(app)
Can you modify this to show the symptom you're experiencing?
- C