Thanks ... this link pointed me in the right direction.

Should I be able to serve up admin media using just Django and
Tornado?  If so, I haven't found the right combination of paths / urls
etc. in settings.py to get that working. The Tornado doc describes how
to "serve static files from Tornado by specifying the static_path
setting in your application" - so it sounds like it might eventually
work? The Tornado blog demo is one example, but I couldn't get that
approach working with my Django app.

I now have nginx serving up the Admin files, running alongside Tornado
and Django. My Admin Site formatting and layout looks fine with that
setup.

-- Brian

On Sep 15, 6:26 am, fruits <fruitsc...@gmail.com> wrote:
> media files for admin is handled by the django dev server. So when you
> change the server, you have to serve admin media file yourself.
>
> http://docs.djangoproject.com/en/dev/howto/deployment/modpython/#id3
>
> On Sep 15, 9:42 am, Brian <bdela...@gmail.com> wrote:
>
>
>
> > I have a small Django app under development and was able to get this
> > running using the github update. My app runs and is very responsive
> > with Tornado.
>
> > Some of my admin site layout is out of whack, but it may be my
> > settings or my bug.  Formatting and CSS I created on my own looks good
> > (e.g. graphics and tables created using the Google Visualization API.)
> > My app is able to go out onto the web, get files downloaded through
> > Tornado - it feels fast ...
>
> > It's terrific to have a Python-based server that could work in both
> > development and production. (Tornado installs/runs fine on a Netbook
> > with Ubuntu!)
>
> > The real-time / asynchronous capabilities look great. Any way Django
> > apps can take advantage of that functionality?
>
> > Thanks for open sourcing this!
>
> > -- Brian
>
> > On Sep 13, 4:26 pm, Bret Taylor <btay...@gmail.com> wrote:
>
> > > I am one of the authors of Tornado (http://www.tornadoweb.org/), the
> > > web server/framework we built at FriendFeed that we open sourced last
> > > week (seehttp://bret.appspot.com/entry/tornado-web-server).
>
> > > The underlying non-blocking HTTP server is fairly high performance, so
> > > I have been working this weekend to get other frameworks like Django
> > > and web.py working on Tornado's server so existing projects could
> > > potentially benefit from the performance. To that end, I just checked
> > > in change to Tornado that enables you to run any WSGI-compatible
> > > framework on Tornado's HTTP server. You can find it in a class called
> > > WSGIContainer in our wsgi.py:
>
> > >http://github.com/facebook/tornado/blob/master/tornado/wsgi.py#L188
>
> > > You will have to check out Tornado from github to get the change; it
> > > is not yet included in the tarball distribution.
>
> > > Here is a template for running a Django app on Tornado's server using
> > > the 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()
>
> > > I have only done very basic tests using the new module, so if any of
> > > you are interested and start using Tornado with your Django projects,
> > > please let us know what bugs you find so we can fix them. Any and all
> > > feedback is appreciated.
>
> > > Bret
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to