Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: cannot import name 'app' from 'flasky' (C:\QGB\Anaconda3\lib\site-packages\flasky\__init__.py) #2

Open
QGB opened this issue Aug 1, 2022 · 0 comments

Comments

@QGB
Copy link

QGB commented Aug 1, 2022

ImportError: cannot import name 'app' from 'flasky' (C:\QGB\Anaconda3\lib\site-packages\flasky_init_.py)

shuold be

from tornado.wsgi import WSGIContainer
from tornado.ioloop import IOLoop
from tornado.web import FallbackHandler, RequestHandler, Application
from flask import app

class MainHandler(RequestHandler):
	def get(self):
		self.write("This message comes from Tornado ^_^")

tr = WSGIContainer(app)

application = Application([
(r"/tornado", MainHandler),
(r".*", FallbackHandler, dict(fallback=tr)),
])

if __name__ == "__main__":
	application.listen(8000)
	IOLoop.instance().start()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant