Tuesday, August 13, 2013

Re: Error importing middleware django.contrib.sessions.middleware

Did you do this part (from the docs):

https://docs.djangoproject.com/en/1.5/topics/http/sessions/#using-database-backed-sessions

Using database-backed sessions

...

Once you have configured your installation, run manage.py syncdb to install the single database table that stores session data.

---

If that doesn't help then, you could try using the Django shell and looking for exception that comes up:

$ python manage.py shell

>>> middleware_path = 'django.contrib.sessions.middleware.SessionMiddleware'
>>> mw_module, mw_classname = middleware_path.rsplit('.', 1)
>>> mw_module
'django.contrib.sessions.middleware'
>>> from django.utils.importlib import import_module
>>> mod = import_module(mw_module)

See

https://github.com/django/django/blob/stable/1.5.x/django/core/handlers/base.py




--
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+unsubscribe@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.

No comments:

Post a Comment