FastCGI support builtin to django-admin for 0.95 (patch included)

14 views
Skip to first unread message

James Crasta

unread,
May 2, 2006, 1:35:19 PM5/2/06
to Django developers
I must say firstly that I'm psyched magic-removal has merged into
trunk.

I know it's not in the established feature set for django 0.95, but I
think this really ought to be considered for inclusion.

Currently, the recommended setup for running django is mod_python.
Unfortunately, for many people on shared hosting this is not an
available option. Many shared hosting providers (dreamhost, bluehost,
textpad, more) however do support FastCGI. Hugo(http://rfc1437.de)
has written a django-fcgi.py script which allows you to run fastcgi
django using the flup python package, though this for a first-time user
can be a bit daunting, as you would need at minimum a shim script, his
django-fcgi script, and a whole boatload of commandline options being
passed around, along with some pythonpath munging.

I put up a ticket (#1736) for a patch to management.py for there to be
an additional directive, manage.py runfcgi
which when run will spawn your project as a fastcgi application. It
supports optional host/port/socket options along with ability to choose
between two implementations (prefork and threaded).

This started more out of an aesthetic thing for me, because I host now
several fastcgi django installations, and not having to write shim
scripts to deploy is nice, but I think it'll be useful to end-users.

I really hope that this could be integrated before 0.95, and I'll be
happy to post documentation for how to use it on both apache and
LigHTTPD setups.

the ticket is here: http://code.djangoproject.com/ticket/1736

James Crasta

Adrian Holovaty

unread,
May 2, 2006, 1:40:59 PM5/2/06
to django-d...@googlegroups.com
On 5/2/06, James Crasta <jcr...@gmail.com> wrote:
> I really hope that this could be integrated before 0.95, and I'll be
> happy to post documentation for how to use it on both apache and
> LigHTTPD setups.

Hey James,

Thanks for this ticket/patch! Yes, some documentation would be
fantastic and would help me understand how to use this before
committing it to trunk. Go ahead and write those docs and append 'em
to the ticket, if you get a chance.

Adrian

--
Adrian Holovaty
holovaty.com | djangoproject.com

James Crasta

unread,
May 9, 2006, 2:42:58 PM5/9/06
to django-d...@googlegroups.com
> Thanks for this ticket/patch! Yes, some documentation would be
> fantastic and would help me understand how to use this before
> committing it to trunk. Go ahead and write those docs and append 'em
> to the ticket, if you get a chance.

I wrote up some documentation in ReST style, copying the style used in
the other django docs, though I do not have the docutils parser to
test if it does indeed work. I'm fairly confident that it should
mostly work, however. I attached the doc to the ticket:

http://code.djangoproject.com/ticket/1736

I added a section on how to run django on a shared-hosting provider;
someone was nice enough to lend me their Dreamhost account so that I
could test it, as this seems to be a very commonly asked question on
the #django IRC.


Cheers,
James

Bryan

unread,
May 16, 2006, 3:28:53 PM5/16/06
to Django developers
Thanks a lot, James. This is really great. Will this be merged into
the trunk any time soon?

Bryan

Reply all
Reply to author
Forward
0 new messages