Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
gateray committed Oct 6, 2017
1 parent 097ab02 commit 1829bfc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# coding: utf-8

import tornado.ioloop
import tornado.options
from tornado.web import Application
from settings import *

Expand Down Expand Up @@ -40,6 +41,7 @@ def getSMTPConn(self):
return ExtApplication(routers, **kwargs)

if __name__ == "__main__":
tornado.options.define(name='port', default=port, type=int, help='given a port')
app = make_app(routers, **appSettings)
app.listen(port, address=address)
app.listen(tornado.options.options.port, address=address)
tornado.ioloop.IOLoop.current().start()
6 changes: 4 additions & 2 deletions views.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,14 @@ def hashdigest(text):
#验证签名
assert (hashdigest(combineStr) == signature), "signature not match."

@tornado.gen.coroutine
def get(self, *args, **kwargs):
self.write("it works!")
yield self.write("it works!")

class IndexHandler(RequestHandler):
@tornado.gen.coroutine
def get(self):
self.write("it works!")
yield self.write("it works!")

class WeiXinQYHandler(BaseHandler):
@tornado.gen.coroutine
Expand Down

0 comments on commit 1829bfc

Please sign in to comment.