Django 1.5.1 on TurnKey Linux: Why and Install How-to

First off, my degree in college was not computer science. Development is something I have had to learn very much the hard way and I am, by no stretch of the imagination, anywhere near the capability of somebody who has actually studied the stuff. I have however, learned quite a bit of Python through the school of hard knocks fueled by necessity and pure stubbornness.

Recently I have been fiddling around and wanting to create something more than just one off scripts. Quite frankly, I want to be able to create my own front end graphical user interface to interact with. Digging around the internet, there is plenty about wxPython. Before the flaming begins, my work is in a Windows world, so if I am going to be figuring out how to get something working, it is going to be on Windows first. Still, I would like to be able to use the goodies I build on my Mac computers and even on my Ubuntu desktop in addition to my current Windows 7 computer and when we get new machines later this year, with Windows 8.

If you are thinking this is a lot of platforms to be supporting just for the sake of tinkering, you are entirely correct. It is kind of daunting, to be quite honest. The easiest way is to go with a web based solution. Years ago I fiddled with html, but this was back in the days of html 4.0. Javascript was just on the horizon and css was the hot new thing replacing table design. I never really got very good at it, but still retained enough to be able to hack around in a page and understand the basics of what I am seeing. Mostly it means I know enough to be able to break stuff really quickly.

Recently I have been reading about how software frameworks are changing application development. True, I am a bit ignorant when it comes to being a true wizard of development, but these things look interesting to me. Rather than having to build the house from the foundation up, software frameworks look a lot like a prefab house. The big pieces are already assembled. All I have to do is figure out how to tack them together into something usable. This sounds like a good idea for a hack like myself.

Since I already have a grasp of Python and in no way consider myself a decent enough developer to jump to a new language and learn it, Django looks pretty interesting. It gets me up and running quickly with something I can build in a language I sort of already know.

The first step is getting started, for me this means getting a disposable testing environment. In this case I grabbed a clean copy of TurnKey Linux. Although there is a TurnKey Django prebuilt image, it is not the current version. To make my life easier, when following the tutorials on the Django site, I grabbed the base TurnKey image, installed PIP and used PIP to install Django. Once I figured it out, the process takes about five minutes. Here are the useful commands.

After getting TurnKey downloaded and running, open up the command line. Since I am running a virtual machine, I just use the web based command line TurnKey makes available as part of the setup. In the command line, install PIP using the command:

apt-get install python-pip

This will prompt to accept downloading and installing the required dependencies. Say yes. Less than 20 seconds later you will be back at the command prompt. Use PIP to download and install Django using the command:

pip install Django==1.5.1

That is it. Now my next steps are to dive into the Django tutorial and see how much stuff I can break. I have had an idea in my head for almost seven years now. Django might just be the way to make it work...