First steps with Pinax

Thursday, 4th June, 2009

Pinax is a web development platform built on top of Django (which is a web development framework). The point of Pinax seems to be that it gathers together and integrates a collection of django applications into one package. You install Pinax and all of a sudden you have a fully functioning ‘default’ social networking website.

Preliminaries for Mac OS X


I’m going to use MySQL with Django. So I need MySQL itself, and the python-mysql interface, python-mysql. If you install mysql and python-mysql from fink, this section may not be necessary.

I installed the Mac OS X MySQL from This meant that the python-mysql from fink didn’t work (it didn’t find mysql & started installing its own). Installing python-mysql from sourceforge didn’t work either: I got a compile error similar to this:

/usr/include/sys/types.h:92: error: duplicate ‘unsigned’
/usr/include/sys/types.h:92: error: two or more data types in declaration specifiers 

From MangoOrange I found the following advice:

Step 4:
In the same folder, edit _mysql.c using your favourite text-editor

4a. Remove the following lines (37-39):

#ifndef uint
#define uint unsigned int

4b. Change the following:

uint port = MYSQL_PORT;
uint client_flag = 0;


unsigned int port = MYSQL_PORT;
unsigned int client_flag = 0;

After a precautionary sudo python clean, python-mysql will now install with the specified sudo python install.


For photo support (e.g. uploading photos to your Pinax homepage), Pinax uses the Python Imaging Library. fink installs PIL to /sw/lib/python2.5/site-packages/PIL/ where MacOSX’s own python can’t find it. I got PIL source from and installed that using sudo python install.

Pinax: install and set up

There’s very little to write here. I followed the instructions and everything worked, …

… except the Locations page in the resulting website. Even here though it showed a very helpful Django error page:

  Exception Type:  	ImproperlyConfigured
  Exception Value:
 	django-locations requires a valid YAHOO_MAPS_API_KEY setting.
   	Please register for a key at
   	and then insert your key into the settings file.

Doesn’t look like I need to worry about that for now. If I want Locations I’ll go get a key, otherwise I’ll uninstall Locations.

Leave a Reply

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

You are commenting using your 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 )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: