So i'm using Pycharm and have installed the Django framework and Postgres. When I initially setup the default Django DB to point to the Postgres database everything works fine.
The problem occurs if I make any changes to a table, meaning the table structure, then try to synchronize the database in Pycharm I'm getting an error message saying "Django default - Connection to Django default failed:"
Here is my setup: OSX Maverick Postgres 9.3 Django 1.5 Pycharm 3 Python 3.3
Any assistance someone can give is greatly appreciated!
It looks like Django can't connect to Postgres. You might just need to tweak your settings.py file to make sure you have the correct postgres DB info in there.
In any event here is a more complete guide:
To get django working with Pycharm
2.go to the project drop down box and click edit configuration then make sure host = 127.0.0.1 port = 8000
make sure it is using python 3.x.x as the interpreter rather than python 2.x
In Pycharm go to Preferences —> Django make sure it is enabled and then:
make sure you have installed psycopg2 if you are using python3 that means using pip3 not pip (pip is for python 2.x) pip3 install psycopg2
Edit your settings.py file as below
DATABASES = {
}
note the default postgres port is 5432 - if it is not connecting using that check this post: postgresql port confusion 5433 or 5432?
this may also be useful: http://marcinkubala.wordpress.com/2013/11/11/postgresql-on-os-x-mavericks/