Skip to content

Tag: tornado

How do I pass variables to scss processor?

My current set up is Front-end: VueJS Backend Python, Tornado Vue is used using the cdn for indivudual static templates. Tornado serves the templates. I’m using the python scss library to compile the scss, that part of pretty straight forward. I have two config.py files that hold configurations with two…

How to get form POST input in Tornado?

I amd new to Tornado framework and trying to make a simple form to upload images: I can successfully receive the Posted file using: However I’m unable to receive the alt input. I tried alt = self.request.alt but I get this error and when I use alt = self.request.files[‘alt’], I get: I ran ou…

Calling a Tornado handler in another handler

I want to split a Tornado handler in two handlers. In the first handler, I want send a command to a sensor. In the second handler, I want to wait for a response from the sensor. Is this possible? Or I can’t call an handler from another? If it’s possible, how I can call this second handler? Thank y…

Python-Tornado on Heroku

I am trying to deploy Tornado on Heroku. I am able to run a simple “hello world” app on using this method: http://kzk9.net/deploying-tornado-on-heroku-mac-os-x But while trying Tornado demo-app “chatdemo”, the server is crashing with following logs: Anybody has any idea whats wrong? An…

How do I get the client IP of a Tornado request?

I have a RequestHandler object for incoming post()s. How can I find the IP of the client making the request? I’ve browsed most of RequestHandler’s methods and properties and seem to have missed something. Answer RequestHandler.request.remote_ip (from RequestHandler’s instance) you can inspec…