shazaman23 / webapp-improved

Automatically exported from code.google.com/p/webapp-improved
Other
0 stars 0 forks source link

RedirectRoute documentation update #63

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The docstring of __init__ in class RedirectRoute (webapp2_extras/routes.py) 
could be improved:

1) I'd suggest using RedirectRoute(..) instead of baseclass Route(..)

2) This example is incorrect:
route = Route('/bar/', BarHandler, strict_slash=True)

It requires the name parameter as well, like:
route = RedirectRoute('/bar/', BarHandler, name=bar, strict_slash=True)

On a side note, I'm not sure why the name parameter is required. Why bother if 
I won't use the name later on? Could it be autogenerated by webapp itself for 
internal use?

Original issue reported on code.google.com by kees...@gmail.com on 14 Aug 2012 at 9:08