Closed GoogleCodeExporter closed 8 years ago
Hi,
You are using it incorrectly. All regular expressions inside a route template
must be enclosed by <>. So to set a "catch all" route you must use:
webapp2.Route(r'/<:.*>', 'handlers.misc.NotFoundHandler', name='misc-not_found')
Or you could use a simple tuple (then it is pure regexp):
(r'/.*', 'handlers.misc.NotFoundHandler')
See the regex template explanation is here:
http://webapp-improved.appspot.com/guide/routing.html#the-regex-template
Also, you can mix tuples and webapp2.Route() instances in the routes list, as
you wish.
Original comment by rodrigo.moraes
on 3 Aug 2011 at 12:35
Original issue reported on code.google.com by
ubaldo
on 2 Aug 2011 at 11:43