Ejemplo n.º 1
0
Archivo: views.py Proyecto: benmao/xfox
def main():
    application = webapp.WSGIApplication(
        [
            ("/a/signup/", SignUpHandler),
            ("/a/signin/", SignInHandler),
            ("/a/signout/", SignOutHandler),
            ("/a/openid/signin/", OpenIDSignInHandler),
            ("/a/openid/signup/", OpenIDSignUpHandler),
            ("/a/openid/add/", OpenIDAddHandler),
            ("/a/openid/remove/", OpenIDRemoveHandler),
            ("/a/mention/", UserMentionHandler),
            ("/a/mention/read/", UserMentionReadHandler),
            ("/a/remind/", UserRemindHandler),
            ("/a/follow/", UserFollowIndexHandler),
            ("/a/followread/", UserFollowReadHandler),
            ("/a/discussion/close/", DiscussionCloseHandler),
            ("/a/setting/", UserSettingHandler),
            ("/a/setting/pwd/", UserSettingPwdHandler),
            ("/a/follow/(?P<name>[a-z0-9A-Z]{3,16})/", UserFollowHandler),
            ("/a/unfollow/(?P<name>[a-z0-9A-Z]{3,16})/", UserUnFollowHandler),
            ("/u/(?P<name>[a-z0-9A-Z]{3,16})/", UserProfileHandler),
            ("/a/notallowed/", UserNotAllowedHandler),
            ("/.*", NotFoundHandler),
        ],
        debug=settings.DEBUG,
    )
    util.run_wsgi_app(webapp_add_wsgi_middleware(application))
Ejemplo n.º 2
0
Archivo: main.py Proyecto: benmao/xfox
def main():
    application = webapp.WSGIApplication ([
                                        ('/', MainHandler),
                                        ('/e/',UpdateHandler),
                                        ('/s/mem/',MemcacheHandler),
                                        ('/.*',NotFoundHandler),
                                        ],
                                         debug=settings.DEBUG)
#    util.run_wsgi_app(application)
    util.run_wsgi_app(webapp_add_wsgi_middleware(application))
Ejemplo n.º 3
0
Archivo: views.py Proyecto: benmao/xfox
def main():
    application = webapp.WSGIApplication(
        [
            ("/g/", GsFileIndexHandler),
            ("/g/upload/", GsUploadHandler),
            ("/g/latex/(?P<key>[a-z0-9]{32})/", LatexImageHandler),
        ],
        debug=settings.DEBUG,
    )
    util.run_wsgi_app(webapp_add_wsgi_middleware(application))
Ejemplo n.º 4
0
Archivo: views.py Proyecto: benmao/xfox
def main():
    application = webapp.WSGIApplication([
                                                          #('/c/?',PostCommentHandler),
                                                          ('/c/ajax/',PostCommentAjaxHandler),
                                                          ('/p/(?P<slug>[a-z0-9-]{2,})/?',PostDisscussionHandler),
                                                          ('/p/(?P<slug>[a-z0-9-]{2,})/(?P<key>[a-z0-9-]+)/?',EditDisscussionHandler),
                                                          ('/b/?',BookmarkHandler),
                                                          ('/f/?',FeedIndexHandler),
                                                          ('/f/(?P<key>[a-z0-9-]{2,})/?',FeedTagHandler),
                                                          ('/f/u/(?P<name>[a-z0-9]{3,16})/?',FeedUserHandler),
                                                          ('/(?P<slug>[a-z0-9-]{2,})/?', TagHandler),
                                                          ('/(?P<slug>[a-z0-9-]{2,})/(?P<key>[a-z0-9-]+)/?',DiscussionHandler),
                                                          ('/(?P<slug>[a-z0-9-]{2,})/(?P<key>[a-z0-9-]+)/(?P<p>[0-9]+)/?',DiscussionHandler),
                                                          ('/.*',NotFoundHandler),
                                                          ],
                                         debug=settings.DEBUG)
    util.run_wsgi_app(webapp_add_wsgi_middleware(application))