I've followed the Djangogirls tutorial and usually the tutorial calls for you to create a database on pythonanywhere
. This usually works without a hitch when using sqlite3
however this time I'm using postgresql
and I got the below error when I ran the migrate
command in the console:
conn = _connect(dsn, connection_factory=connection_factory, async=async)
django.db.utils.OperationalError: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql
What does this mean exactly?
using python 3.5.1
django 1.9.8
postgresql 9.4
Thanks
Ok after reading around some more, this is my problem in a nutshell.
I have postgresql running locally. I then deployed the wbapp onto pythonanywhere. Whilst there I tried to create the database by running migrate which resulted in the above error.
Since then i realised that I had to setup postgresql to run on pythonanywhere. I followed the instructions and did that, but what I don't understand is do I now have to create the database from scratch? And if that is the case what happens to all my tables etc. from my local database?