I am deploying Django App on heroku, after successful deployment , I am getting operational Error
<pre><code>OperationalError at /admin/login/
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"?

Request Method: POST
Django Version: 1.10b1
Exception Type: OperationalError
Exception Value:    
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"?
Exception Location: /app/.heroku/python/lib/python2.7/site-packages/psycopg2/__init__.py in connect, line 164
Python Executable:  /app/.heroku/python/bin/python
Python Version: 2.7.12
Python Path:    
['/app',
 '/app/.heroku/python/bin',
 '/app',
 '/app/.heroku/python/lib/python27.zip',
 '/app/.heroku/python/lib/python2.7',
 '/app/.heroku/python/lib/python2.7/plat-linux2',
 '/app/.heroku/python/lib/python2.7/lib-tk',
 '/app/.heroku/python/lib/python2.7/lib-old',
 '/app/.heroku/python/lib/python2.7/lib-dynload',
 '/app/.heroku/python/lib/python2.7/site-packages',
 '/app/.heroku/python/lib/python2.7/site-packages/setuptools-25.2.0-py2.7.egg',
 '/app/.heroku/python/lib/python2.7/site-packages/pip-8.1.2-py2.7.egg']
</code></pre>

<p>There is a problem in your database settings. You have to modify database settings to be able to deploy to Heroku. I have never used it, but this page explains how to configure database for Django:
<a href="https://devcenter.heroku.com/articles/django-app-configuration" rel="nofollow">https://devcenter.heroku.com/articles/django-app-configuration</a></p>

python django python-2.7 heroku