All pastes #367593 Raw Edit

Anonymous

public text v1 · immutable
#367593 ·published 2007-02-22 13:28 UTC
rendered paste body
Mod_python error: "PythonHandler django.core.handlers.modpython"

Traceback (most recent call last):

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

  File "/home/code/django/core/handlers/modpython.py", line 190, in handler
    return ModPythonHandler()(req)

  File "/home/code/django/core/handlers/modpython.py", line 160, in __call__
    self.load_middleware()

  File "/home/code/django/core/handlers/base.py", line 29, in load_middleware
    raise exceptions.ImproperlyConfigured, 'Error importing middleware %s: "%s"' % (mw_module, e)

ImproperlyConfigured: Error importing middleware django.middleware.sessions: "cannot import name news"

-------------------------

<VirtualHost *>
    ServerName 192.168.130.235
    ErrorLog /var/log/apache2/apache2-django-error.log
    CustomLog /var/log/apache2/apache2-django-access.log combined
    <Location />
        SetHandler python-program
        PythonDebug On
        PythonAutoReload Off
        PythonInterpreter main
        PythonHandler django.core.handlers.modpython
        PythonPath "['/home/code/'] + sys.path"
        SetEnv DJANGO_SETTINGS_MODULE name.settings
    </Location>
</VirtualHost>





----------
MIDDLEWARE_CLASSES = (
    "django.middleware.common.CommonMiddleware",
    "django.middleware.sessions.SessionMiddleware",
    "django.middleware.doc.XViewMiddleware",
    'django.contrib.redirects.middleware.RedirectFallbackMiddleware',
)