title: Postgresql and django - Unix domain socket
body: <p>i spend couple of hours to solve these problem but did not reach anything. There are several topics about this problem on the net but none of them says an absolute thing to solve this.</p>
  
  <p>I just installed postgresql in order to use it on my django project.</p>
  
  <pre><code>DATABASES = {
      "default": {
          "ENGINE": "django.db.backends.postgresql_psycopg2", # Add "postgresql_psycopg2", "postgresql", "mysql", "sqlite3" or "oracle".
          "NAME": "name",                       # Or path to database file if using sqlite3.
          "USER": "postgres",                             # Not used with sqlite3.
          "PASSWORD": "pass",                         # Not used with sqlite3.
          "HOST": "",                             # Set to empty string for localhost. Not used with sqlite3.
          "PORT": "",                             # Set to empty string for default. Not used with sqlite3.
      }
  }
  </code></pre>
  
  <p>this is my settings.py and the error is that</p>
  
  <pre><code>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/.s.PGSQL.5432"?
  </code></pre>
  
  <p>Did anyone have a solution about it  ?</p>