On Tue, 2011-07-19 at 11:59 -0700, Jason wrote: > The documentation at > http://www.kemeneur.com/clients/pylons/docs/pyramid/narr/urldispatch.html > (under Route Pattern Syntax) shows that I could put "/{action}.{ext}" as a > route pattern and both would come up as matchdict values.
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 -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
