Archive for the ‘Install’ Category

My first Django app

September 15, 2008

Today I followed the first two pages of the Django tutorial with one small difference. Instead of recreating the polling app I decided to start right away on my Contented Web app (CW).

Creating the Django project and my app was straight forward – although I must admit I don’t understand the technical nuances of everything that I am following. I think partially this is due to the Unix environment I am using.

The models I created are essentialy enough for creating a hierarchical menu structure. This seemed straightforward and I quickly got the hang of how to define and alter my models, including a recursive relationship.

What blew me away though was the admin site that was created and how easily I could modify the look and feel of the forms through the use of python tuples and lists. Pure class. As far as I can tell the whole admin site can be remodelled without affecting the functionality. This is great. One of the annoying things about most CMS tools is that whilst they enable you to create great looking websites, the admin interface always seems to be forgotten. And there seems to be little thought given to making it customisable.

So after about 3 hourse of playing around with Django and following the first two tutorials I now have a fully functioning admin interface for my models, including user management and access rights.

Getting Django

September 12, 2008

So, my first post is about downloading and installing Django. Makes sense.

My development environment, by the way, is Ubuntu running in VMWare player on Windows Vista. I decided to go with Unix for my Django work as it seems that that is what most of the documentation is targeted at. I had tried Virtual PC 2007, but be warned, Ubuntu on Virtual PC 2007 does not work out of the box.

I followed the steps on the “How to install Django” page. Ubuntu already shipped with the latest version of Python so there was no need to install that.  I did not install Django on Apache as this a development environment and I will simply be using the inbuilt python webserver and I chose to go for SQLite as the database which also comes as part of Django – mainly so I could get going asap. Getting this far took me about an hour. Most of which was time spent getting to grips with Ubuntu.