Re: Serving static files from separate server

106 views
Skip to first unread message

Peter Bengtsson

unread,
Aug 30, 2012, 12:21:01 PM8/30/12
to python-...@googlegroups.com
I use tornado_static from tornado-utils to make all static URLs be prefixed with a AWS Cloudfront domain name. 

On Wednesday, August 29, 2012 2:44:46 AM UTC-7, lincthra wrote:
Hello all, fairly new to Tornado, a little under a year into Python (thanks to Udacity.com).

My questions are these:

A) Can I set the static path to be a url to a remote server? If so, how?

B) Does anyone have any tips on changing out my old MySQL cursor.executes to work with DynamoDB?

We've recently decided to go cloud server. As such, I've gotten my Tornado server running just fine on E2. I'm still fighting my way into ElastiCache (but I think I'll get that one). My biggest things are that I'd like to serve my static files from my S3 bucket (since it IS a static content delivery...) and how to get info in and out of DynamoDB (so I can scale in a better fashion I'm going to try something other than my old faithful MySQL) from my Python.

Thanks,
Lincthra

Lysander Trischler

unread,
Aug 30, 2012, 2:25:28 PM8/30/12
to python-...@googlegroups.com
Hi Lincthra,

> A) Can I set the static path to be a url to a remote server? If so, how?

I think you can specify this via static_url_prefix="http://s.example.com/" in
the application settings.

See http://www.tornadoweb.org/documentation/web.html#application-configuration

Regards,
Lyse

lincthra

unread,
Aug 30, 2012, 9:01:10 PM8/30/12
to python-...@googlegroups.com
Thanks. They sure crammed that in there in the most obscure way possible, didn't they... lol. I'll give it a shot.
Reply all
Reply to author
Forward
0 new messages