Getting Started with GeoDjango …

The only reason for my dabblings with Django has been that I wanted to see Geodjango in action. Most of my dabbling has been with Django under Ubuntu using Ayman Hourieh’s “Website Development with Django…” and “Python Web Development with Django” – both of which I’ve found rather useless books – and more successfully using the Apress titles “The Definitive Guide to Django” and ” Practical Django Projects“. In my opinion, the former two titles take a very convoluted approach to explaining the MVC architecture, which is done in a more friendly approach by the Apress authors. I am not a web developer. I am interested in GIS.

More recently, I installed Django on Windows to get things down (I simply spend more time with Windows, like it or not). A good step-by-step guide was this one by John P. Mulligan. What follows is a list of steps taken by me, with a few additional download links. It’s somewhat redundant in light of the previous good work by Mulligan. It’s more of personal recap for myself to keep track of steps taken.

1) I downloaded and installed PostgreSQL8.4 from EnterpriseDB.

2) Then I installed win-psycopg.

3) Then I installed Tortoise SVN.

4) Then I SVN to check out the latest Django revision.

5) Finally, I added Apache2 and mod_python.

The only problem I encountered was with getting Django to work with Vista, quoting:

If you get Type 'django-admin.py help' for usage. when trying to run django-admin.py startproject mysite, the cause of the problem is that only the first argument (startproject) gets transferred to django-admin.py. This seems to be a Vista feature, and furthermore, Vista itself has no tools to fix the situation.

However, there was help here, and it seemed to help.

But when I started looking at the Geodjango installation guide under Windows, I realized that I should’ve installed Postgres8.3 instead of 8.4 because of compatibility with PostGIS. Undoing this caused me all kinds of troubles with Stackbuilder, once I wanted to add PostGIS. There is some help here. I finally installed version 8.3 in a different directory and ignored the last error with creating a template PostGIS database… This is where I left off and hopefully it will work now.

Oh, and I just found another, similar step-by-step here.

Advertisements

Leave a comment

Filed under Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s