Setting up django for the first time

By : Matthew

I'm used to setting up a server for nginx with php and mysql. I understand that just fine. But I'm extremely confused at where to even start with django. I know nothing about python by the way.

I'm running ubuntu 10.04

Python is already installed (not sure what version though. I read I need less than 3 or something)

So firstly, how do I get fastcgi running and using python? I know how to pass to it from nginx once it's running.

I also read something about needing "flup". How do I install that?

And then where do python files go? I thought I saw something about generating a sort of skeleton set up? Maybe I'm wrong on that.

Maybe point me to a super simplified tutorial or something - not the instructions on django's site - I'm just not getting it.

By : Matthew


lighttpd is great for fcgi. for maximum flexibilty start the django fcgi as tcp-listener, and have the lighttpd connect to it.

By : allo

I did some serious flailing around when I was faced with an existing Django app that I had to re-host. I had experience with Rails but none with Django. I wound up with Nginx serving static resources and proxying framework requests to Apache and mod_python -- if I recall correctly my app had a mod_python dependency. Here are the resources which came in handy for me:

The phrasing of your question made me think that, like me, you had a more-or-less functioning app that you're now trying to put in production. (If you're starting from scratch, Seitaridis has the answer for you.) One or two of these links should get you to the point where you have error messages you can search here.

By : pjmorse

I've found this blog post by Brandon Konkle very helpful for setting up a new Django server on Ubuntu. He goes the Nginx/Gunicorn route rather than Nginx/fcgi but it's a server setup that is becoming more common and popular in the Django community recently.

This video can help you solving your question :)
By: admin