Mod_python error: "PythonHandler django.core.handlers.modpython"

Traceback (most recent call last):

  File "/usr/lib64/python2.4/site-packages/mod_python/apache.py", line 299, in HandlerDispatch
    result = object(req)

  File "/usr/lib/python2.4/site-packages/django_12/django/core/handlers/modpython.py", line 228, in handler
    return ModPythonHandler()(req)

  File "/usr/lib/python2.4/site-packages/django_12/django/core/handlers/modpython.py", line 191, in __call__
    self.load_middleware()

  File "/var/www/gaiapost/django/core/handlers/base.py", line 40, in load_middleware
    mod = import_module(mw_module)

  File "/var/www/Tatad_new/django/utils/importlib.py", line 35, in import_module
    __import__(name)

  File "/var/www/gaiapost/ActivityLog/ActivityLogMiddleware.py", line 1, in ?
    from ActivityLog.models import ActivityLog,Agent

  File "/var/www/gaiapost/ActivityLog/models.py", line 2, in ?
    from django.db import models

  File "/var/www/Tatad_new/django/db/__init__.py", line 77, in ?
    connection = connections[DEFAULT_DB_ALIAS]

  File "/var/www/Tatad_new/django/db/utils.py", line 93, in __getitem__
    conn = backend.DatabaseWrapper(db, alias)

  File "/var/www/Tatad_new/django/contrib/gis/db/backends/postgis/base.py", line 11, in __init__
    self.ops = PostGISOperations(self)

  File "/var/www/Tatad_new/django/contrib/gis/db/backends/postgis/operations.py", line 91, in __init__
    vtup = self.postgis_version_tuple()

  File "/var/www/Tatad_new/django/contrib/gis/db/backends/postgis/operations.py", line 445, in postgis_version_tuple
    version = self.postgis_lib_version()

  File "/var/www/Tatad_new/django/contrib/gis/db/backends/postgis/operations.py", line 425, in postgis_lib_version
    return self._get_postgis_func('postgis_lib_version')

  File "/var/www/Tatad_new/django/contrib/gis/db/backends/postgis/operations.py", line 406, in _get_postgis_func
    cursor = self.connection._cursor()

  File "/var/www/Tatad_new/django/db/backends/postgresql_psycopg2/base.py", line 136, in _cursor
    self.connection = Database.connect(**conn_params)

OperationalError: could not connect to server: No route to host
	Is the server running on host "db01" and accepting
	TCP/IP connections on port 5432?