Hello,
I removed *Memcached* from django then i restarted Apache, but I am getting 
an ImproperlyConfigured error on account of custom middleware:

*ImproperlyConfigured: Error importing middleware 
django.contrib.sessions.middleware: "No module named base"
*

[error] mod_wsgi (pid=758249): Exception occurred processing WSGI script 
'/home/super/webapps/djapp/osqa.wsgi'.[error] Traceback (most recent call 
last):[error] File 
"/home/super/webapps/djapp/lib/python2.7/django/core/handlers/wsgi.py", line 
232, in __call__[error] self.load_middleware()[error] File 
"/home/super/webapps/djapp/lib/python2.7/django/core/handlers/base.py", line 
42, in load_middleware[error] raise exceptions.ImproperlyConfigured('Error 
importing middleware %s: "%s"' % (mw_module, e))[error] ImproperlyConfigured: 
Error importing middleware django.contrib.sessions.middleware: "No module named 
base"


This the relevant parts of my settings.py file:

MIDDLEWARE_CLASSES = [
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'forum.middleware.extended_user.ExtendedUser',
    'forum.middleware.anon_user.ConnectToSessionMessagesMiddleware',
    'forum.middleware.request_utils.RequestUtils',
    'forum.middleware.cancel.CancelActionMiddleware',
    'forum.middleware.admin_messages.AdminMessagesMiddleware',
    'django.middleware.transaction.TransactionMiddleware',]

INSTALLED_APPS = [
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.admin',
    'django.contrib.humanize',
    'django.contrib.sitemaps',
    'django.contrib.markup',
    'forum',]


And my *.wsgi file.

import osimport sys

sys.path.append('/home/super/webapps/djapp/qa')
os.environ['DJANGO_SETTINGS_MODULE'] = 'qa.settings'import 
django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()


In *lib/python2.7/django/contrib/sessions* i have __init__.py and 
middleware.py files but there is no a middleware directory instead there is 
backends folder.
The base.py is inside the backends folder 
lib/python2.7/django/contrib/sessions/backends and within this folder I 
also have __init__.py.


Do you have any ideas what the issue may be and what's I need to do to 
resolve it?
Thank you so much.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to