Question about customizing Django's session backend.

26 views
Skip to first unread message

Chen Xu

unread,
Jan 21, 2014, 12:04:20 AM1/21/14
to django...@googlegroups.com
Hi everyone,
I am wondering if there is a way to customize django's session backend like we can do it for user authentication backend, the reason why I ask this is that when I call django.contrib.auth.login, it gives me the error no django_session table since I am using sqlalchemy, I did not do python manage.py syncdb at all.

Thanks in advance.

--
⚡ Chen Xu

Начаров Михаил

unread,
Jan 21, 2014, 12:32:33 AM1/21/14
to django...@googlegroups.com
Hi Chen.

There are several session backends in django: database, cached, file-based. You can read about them on this page. But I didn't see obstacles for using default django configuration. You can use django models for django contrib application, while in your own apps still using sqlalchemy.

Cheers!


21.01.2014 11:04, Chen Xu пишет:
--

Chen Xu

unread,
Jan 21, 2014, 1:10:45 AM1/21/14
to django...@googlegroups.com
I see, thanks for your answer, however I encounter an error that says 'User'  object has no attribute 'pk' when I try to do:
login(request, user).

Could someone help?



--
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...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/52DE0671.1000001%40gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
⚡ Chen Xu
Reply all
Reply to author
Forward
0 new messages