Exemple #1
0
#!/usr/bin/env python

import tornado.web

from torouter import urls, include


class IndexHandler(tornado.web.RequestHandler):
    pass


handlers = urls('',
    (r'/', IndexHandler),
    (r'/auth', include('auth.handlers')),
)


if __name__ == '__main__':
    from pprint import pprint
    pprint(handlers)
Exemple #2
0
#!/usr/bin/env python

import tornado.web

from torouter import urls


class MainHandler(tornado.web.RequestHandler):
    pass


class RegisterHandler(tornado.web.RequestHandler):
    pass


class LoginHandler(tornado.web.RequestHandler):
    pass


class LogoutHandler(tornado.web.RequestHandler):
    pass


handlers = urls('',
    (r'/', MainHandler),
    (r'/register', RegisterHandler),
    (r'/login', LoginHandler),
    (r'/logout', LogoutHandler),
)