How to setup PostgreSQL Database in Django, this night I wanna share simple tutorial how to setup PostgreSQL Database in Django. This problem has been asked and solved with user from


Download, then install it under django & python PATH.

After downloading, easily extract the tarball and:

$ python install

Or if you wish, at [command-line|console] install it by either easy_install or pip. (I prefer to use pip over easy_install for no reason.)

$ easy_install psycopg2

Or this:

$ pip install psycopg2


in your, change default database sqlite3 to this configuration.

    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'db_name',                      
        'USER': 'db_user',
        'PASSWORD': 'db_user_password',
        'HOST': '',
        'PORT': 'db_port_number',

Hopefully can help..

146 7 7 0