2009/9/19 Kenneth Gonsalves <law...@thenilgiris.com>: > > On Monday 14 Sep 2009 1:56:32 am Bret Taylor wrote: >> he module: >> >> import django.core.handlers.wsgi >> import os >> import tornado.httpserver >> import tornado.ioloop >> import tornado.wsgi >> >> def main(): >> os.environ["DJANGO_SETTINGS_MODULE"] = 'myapp.settings' >> application = django.core.handlers.wsgi.WSGIHandler() >> container = tornado.wsgi.WSGIContainer(application) >> http_server = tornado.httpserver.HTTPServer(container) >> http_server.listen(8888) >> tornado.ioloop.IOLoop.instance().start() >> >> if __name__ == "__main__": >> main() > > cool - this worked out of the box - but no css and js - can I serve media from > tornado, and if so, a pointer as to how? > --
Have you properly configured your MEDIA_URL to point to your Tornado server instead of localhost:8000. I haven't made any test about Tornado performance on serving statig files, but on production our actual configuration with CherryPy in WSGI mode involves a nginx server acting as a reverse proxy and serving the media files. I use the configuration without nginx pointing directly to the WSGI server just to make sure that all the media points to right server. That is, that I have write all my media files as {{MEDIA_URL}}/img/xxxx.jpg and so on. Hope it helps! -- Antoni Aloy López Blog: http://trespams.com Site: http://apsl.net --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---