shazaman23 / webapp-improved

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

SimpleRoute is incomplete and incompatible for using uri_for #65

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Define a named SimpleRoute (tuple).  ('/profle', handlers.Profile, 'profile')
2. Try to build a url by name.  profile_url = webapp2.uri_for('profile')  OR 
profile_url = self.uri_for('profile')
3. Load any page in your app and see the 500 error caused by 
NotImplementedError being raised.

What is the expected output? What do you see instead?
Expected to behave like Route.
Instead, it throws a 500 error which can easily be overcome.

What version of the product are you using? On what operating system?
2.5.1 running on OSX through the 1.7.1 GAE SDK

Please provide any additional information below.
This is somewhat related to the other issue I filed in August, where a 
SimpleRoute and Route behave quite differently and can not be used 
interchangeably.
http://code.google.com/p/webapp-improved/issues/detail?id=61

It probably makes sense to drop SimpleRoute altogether and populate a Route 
using the provided tuple. In doing this, proper regular expression support 
would need to be added so that developers can append their URLs with "/?" to 
support optional trailing slashes with ease.

Original issue reported on code.google.com by erichigg...@gmail.com on 18 Sep 2012 at 8:02