Thank you so much WongoBongo,
Yes I have sync database but now when I run the command again i get this 
following error (i tried with python2.7 manage.py syncdb and python2.7 
manage.py syncdb --settings=settings_mysetting):

raise ImproperlyConfigured('ImportError %s: %s' % (app, e.args[0]))
django.core.exceptions.ImproperlyConfigured: ImportError django.contrib.admin: 
No module named base



I tried using the Django shell and i get this error:

$ python2.7 manage.py shellError: No module named base


I don't know what is wrong.

I have run you commands:

> *>>> middleware_path = 'django.contrib.sessions.
> middleware.SessionMiddleware'
> **>>> mw_module, mw_classname = middleware_path.rsplit('.', 1)
> **>>> mw_module
> **'django.contrib.sessions.**middleware'*
>


but for when i running >>> *from **django.utils.importlib import 
import_module* I get this error:

*Traceback (most recent call last):
> **  File "<stdin>", line 1, in <module>
> **ImportError: No module named django.utils.importlib*


runnong >>> *middleware_path* i get:

> *'django.contrib.sessions.middleware.SessionMiddleware'*



I am a newbie of django, so I'm sorry I can not fix the issue by itself.
Any help is appreciated. Thank you.


Il giorno martedì 13 agosto 2013 09:08:49 UTC+2, WongoBongo ha scritto:
>
> 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<https://docs.djangoproject.com/en/dev/topics/http/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+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