title: A better PyGreSql support for Django author: admin type: post date: 2014-01-02T21:33:40+00:00 url: /a-better-pygresql-support-for-django/ tumblr_gethue_permalink:
With the release of django-pygresql, the Hue team has taken a first stab at PyGreSQL support in Django!
The open source world has many different kinds of licenses and it can be confusing to know which one makes sense for you. PyGreSQL is a PostgreSQL client with a permissible enough license that it can be packaged and shipped.
PyGreSQL has some minor differences from the provided postgresql backend. It required a few changes including:
To install this backend:
Run
unzip master.zip && cd django-pygresql-master && /build/env/bin/python install setup.py
At the bottom of /desktop/core/src/desktop/settings.py, add the following code:
if DATABASES['default']['ENGINE'] == 'django_pygresql':
SOUTH_DATABASE_ADAPTERS = {
'default': 'south.db.postgresql_psycopg2'
}
This is an initial implementation of a backend for Django to communicate with PostgreSQL via PyGreSQL. We hope this helps other members of the community.