--- 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: - http://gethue.tumblr.com/post/72002742226/a-better-pygresql-support-for-django tumblr_gethue_id: - 72002742226 sf_thumbnail_type: - none sf_thumbnail_link_type: - link_to_post sf_detail_type: - none sf_page_title: - 1 sf_page_title_style: - standard sf_no_breadcrumbs: - 1 sf_page_title_bg: - none sf_page_title_text_style: - light sf_background_image_size: - cover sf_social_sharing: - 1 sf_sidebar_config: - left-sidebar sf_left_sidebar: - Sidebar-2 sf_right_sidebar: - Sidebar-1 sf_caption_position: - caption-right categories: - Development ---
With the release of django-pygresql, the Hue team has taken a first stab at PyGreSQL support in Django!
# The ‘Why’ 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][1] client with a permissible enough license that it can be packaged and shipped. # The ‘How’ PyGreSQL has some minor differences from the provided postgresql backend. It required a few changes including: * Massaging Date/Datetime/Time types to work with Django. * A custom cursor for massaging data. * Custom autocommit management. To install this backend: 1. Download [django-pygresql][2]. 2. Rununzip master.zip && cd django-pygresql-master && /build/env/bin/python install setup.py3. At the bottom of
if DATABASES['default']['ENGINE'] == 'django_pygresql':
SOUTH_DATABASE_ADAPTERS = {
'default': 'south.db.postgresql_psycopg2'
}