UUID Objects in Pylons with SQLAlchemy

Recently I had to generate and store uuid objects into a Postgres database, but to my surprise SQLAlchemy kept showing the following error: sqlalchemy.exc.ProgrammingError: (ProgrammingError) can’t adapt type ‘UUID’ So the solution was that I had to change my field type from varchar to uuid on my Postgres database, import the psycopg2 extras functions and [...]

Pylons and Facebook based Authorization with OAuth 2.0

Authorizing a user using Facebook OAuth 2.0 based login it’s pretty straighfoard. This is for the person who asked a question on stackoverflow.com I hope it helps. Add the apikey, appid and secret of my Facebook app to the development.ini file facebook.apikey = 42bc5a4051b274ede5cb73a6cd6fad56 facebook.secret = a355e66e8c0293390896a170f9d5r4c3 facebook.appid = 20894420580890 Configure my model/init.py file: from [...]

Host Email with Postfix, Dovecot and Postgres on Debian 6 (Squeeze)

Recently I had to configure a web server from scratch, which I haven’t done in a while. So I took a look at the guides from my current hosting provider Linode. They have a guide covering debian 5 (Lenny) which is basically the same for debian 6 (squeeze). To make this a bit more exciting [...]