snakajima / gdispatch
- Source
- Commits
- Network (1)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Branch:
master
| name | age | message | |
|---|---|---|---|
| |
README | Tue Dec 15 20:54:59 -0800 2009 | |
| |
gdispatch.py | Fri Nov 27 09:06:43 -0800 2009 | |
| |
test.py | Tue Nov 17 22:20:22 -0800 2009 | |
| |
test_gdispatch.py | Tue Nov 17 22:20:22 -0800 2009 |
README
gdispatch is a simple python module that enables in-place routing instruction right above each RequestHandler.
It also allows RequestHandler to recieve GET/POST parameters as function arguments
Example:
gdispatch.route(lambda:('/login', LoginHandler))
class LoginHandler(webapp.RequestHandler):
@gdispatch.kwargs
def post(self, name, password):
...
gdispatch.route(lambda:('/logout', LogoutHandler))
class LogoutHandler(webapp.RequestHandler):
def get(self):
...
gdispatch.run()
