The Daily Build

Icon

Software Development, version 3.0

Deploying Django Apps on Dreamhost

The Dreamhost wiki article on Django helped, but all the steps starting from scratch aren’t really documented in one place. Hopefully the list below will help, but since I’m writing it after the fact and I had to go through a couple of iterations to get it right, there are probably some things that aren’t 100% right.

  1. Read the python article. Set up virtualenv into $HOME/local.
  2. If you’ve already messed around with installing MySQLdb and/or other packages, remove them and start over.
  3. Install ez_setup (easy_install) as describe in the article.
  4. Install the MySQL egg: easy_install MySQL_python
  5. Follow the setup steps in the Django article. Do the “myproject” test using sqlite3. Really. It helped me find a couple of things I was doing wrong with my real (i.e. more complicated) MySQL project.
  6. As a deviation from the Django setup instructions, I prefer to use a fork of the Django codebase with some of my own patches. If you’re in the same situation, use github. I forked the github “unofficial copy” of the subversion code, added a couple of patches that aren’t in the trunk yet and a couple of my own, and cloned a copy into my dreamhost account.
Share and Enjoy:
  • del.icio.us
  • Digg
  • Sphinn
  • Facebook
  • Mixx
  • Google Bookmarks
  • Twitter
  • FriendFeed
  • Posterous
  • email

Related posts:

  1. Use Local SSH Forwarding to Reduce the Number of Manual Hops Local port forwarding is the same as remote port forwarding...
  2. 3 Easy Ways to Stick to a Coding Standard When you’re writing python, you don’t need a lot...
  3. Using Python’s ctypes to Call Into C Libraries The ctypes module makes loading and calling into a dynamic...
  4. Using Lenny to Build Jaunty Packages <shameless_plug> I’m in the middle of putting together packages...
  5. How to Tell SSH Who You Are Do you log in to several servers with different usernames...

Category: django

Tagged: , ,

2 Responses

  1. Steve says:

    Thanks for the article but the first question that springs to mind is: why would you bother?

    WebFaction ( http://www.webfaction.com ) is a much faster hosting provider than DreamHost (because they don’t oversell like DreamHost does) and they have the best support for Django!

  2. Steve -

    Thanks for the suggestion.

    I looked at Webfaction in comparison to Dreamhost. Dreamhost won mainly on cost — $97 off coupon means it cost about $30 for a year, which makes it ridiculously cheap to get started. So if I need to “upgrade” to Webfaction in a couple of months it will just cost me a few hours to make the switch.

    Stay tuned, I’ll let you know how it goes…

    -Brian

Leave a Reply

About Me

Related Posts

Related posts:

  1. Use Local SSH Forwarding to Reduce the Number of Manual Hops Local port forwarding is the same as remote port forwarding...
  2. 3 Easy Ways to Stick to a Coding Standard When you’re writing python, you don’t need a lot...
  3. Using Python’s ctypes to Call Into C Libraries The ctypes module makes loading and calling into a dynamic...
  4. Using Lenny to Build Jaunty Packages <shameless_plug> I’m in the middle of putting together packages...
  5. How to Tell SSH Who You Are Do you log in to several servers with different usernames...