The Datamind

|

The personal website of Wil Black

Archive for May, 2011

Deploying Pinax

Saturday, May 21st, 2011

The documentation on Pinax delpoyment is lacking.
Here are a few things that I ran in to.
(more…)

Installing PostGIS on Ubuntu 10.04 Server

Saturday, May 21st, 2011

Update Jan 19, 2012

I have an existing django app I have been working on. I want to now move from the sqlite dev database I have been using to a postGIS data. I am on the same machine as I used to preform the steps below so the libraries should already be installed. Also I do not need to rerun the template script.
I first create a database for my app named dev_bb

createdb -T template_postgis dev_bb

Then I source my vertualenv and try to syncdb and get the following error.

File "/home/wilblack/virtualenvs/bb_env/lib/python2.6/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 24, in 
    raise ImproperlyConfigured("Error loading psycopg2 module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 module: No module named psycopg2

It looks like python cannot see psycopg2 because it is installed outside the virtualenv. Pip to the rescue. A simple

pip install psycopg2

and I’m back in business.

 


I just got done installing PostGIS 8.4 on my Ubuntu 10.04 Server. apt-get makes this process very simple.
(more…)

Articles on REST (Representational State Transfer)

Tuesday, May 10th, 2011

http://www.infoq.com/articles/rest-introduction

http://www.oracle.com/technetwork/articles/javase/index-137171.html

A few web developer tools

Tuesday, May 10th, 2011

As a web developer I am always looking for ways to make my applications better for the client and easier for me to create and maintain. And when you get down to it these things go hand-in-hand. I recently came across two very interesting open-source projects that look like they can help with that.

The first is a client side Javscript MVC framework called Backbone.js. I learned about it from ThinkVitamin. It is available at github here. This framework is for Javascript heavy web-apps where the DOM manipulation becomes complex. Mapping and GIS applications are places where a framework like this is useful (such as the TreeTracker Mapper I am working on). Is comes with several useful methods and communicates with a RESTful web-server via JSON. Very nice.

The second application called Pinax. As their site says “Pinax is an open-source platform built on the Django Web Framework.” It is sort of like a barbones WordPress site that sits on top of Django. I apt-got this over the weekend and tried it out. For someone with a Django background it was very easy to get started with. It comes with several pre-built examples that take minutes to set up. Pinax takes care of some of the more mundane aspects of a web-app development like user authentication and user profiles. It also comes with some useful applications built in like a wiki, blogs, and notification system. I will definitely try this out on my next project.

Switch to our mobile site