On 12 February 2010 11:26, chiranjeevi muttoju <chiranjeevi.mutt...@gmail.com> wrote: > Hi, > When i'm using the session in django i'm getting this error relation > "django_session" does not exist. what is that error.. if any one of u know > please help me.. > My code is: > >>>> from django.contrib.sessions.backends.db import SessionStore >>>> s = SessionStore(session_key='2b1189a188b44ad18c35e113ac6ceead') > >>>> from datetime import datetime >>>> s['last_login'] = datetime.datetime(2005, 8, 20, 13, 35, 10) > Traceback (most recent call last): > File "<console>", line 1, in <module> > > AttributeError: type object 'datetime.datetime' has no attribute 'datetime' >>>> import datetime >>>> s['last_login'] = datetime.datetime(2005, 8, 20, 13, 35, 10) > Traceback (most recent call last): > > File "<console>", line 1, in <module> > File > "C:\Python26\lib\site-packages\django\contrib\sessions\backends\base.py", > line 49, in __setitem__ > self._session[key] = value > File > "C:\Python26\lib\site-packages\django\contrib\sessions\backends\base.py", > line 172, in _get_session > > self._session_cache = self.load() > File > "C:\Python26\lib\site-packages\django\contrib\sessions\backends\db.py", line > 16, in load > expire_date__gt=datetime.datetime.now() > File "C:\Python26\lib\site-packages\django\db\models\manager.py", line > 119, in get > > return self.get_query_set().get(*args, **kwargs) > File "C:\Python26\lib\site-packages\django\db\models\query.py", line 323, > in get > num = len(clone) > File "C:\Python26\lib\site-packages\django\db\models\query.py", line 74, > in __len__ > > self._result_cache = list(self.iterator()) > File "C:\Python26\lib\site-packages\django\db\models\query.py", line 261, > in iterator > for row in self.query.results_iter(): > File "C:\Python26\lib\site-packages\django\db\models\sql\query.py", line > 281, in results_iter > > for rows in self.execute_sql(MULTI): > File "C:\Python26\lib\site-packages\django\db\models\sql\query.py", line > 2373, in execute_sql > cursor.execute(sql, params) > File "C:\Python26\lib\site-packages\django\db\backends\util.py", line 19, > in execute > > return self.cursor.execute(sql, params) > ProgrammingError: relation "django_session" does not exist > > > -- > Thanks & Regards, > Chiranjeevi.Muttoju > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. >
Have you tried running python manage.py syncdb -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.