session id attribute error

35 views
Skip to first unread message

shiva singh

unread,
Sep 19, 2022, 4:00:07 AM9/19/22
to Django users
hello everyone please help me how can solve this problem:-image.jpeg 

Muhammad Juwaini Abdul Rahman

unread,
Sep 19, 2022, 4:11:46 AM9/19/22
to django...@googlegroups.com
That was user, so probably you need request.user.id, not session.

On Mon, 19 Sept 2022 at 16:00, shiva singh <shivas...@gmail.com> wrote:
hello everyone please help me how can solve this problem:-image.jpeg 

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f1b3116a-a14a-45fb-84d0-c4f95a05fdf0n%40googlegroups.com.

Aashish Kumar

unread,
Sep 19, 2022, 1:18:02 PM9/19/22
to django...@googlegroups.com
Do this 

request.session.get(‘id’)

On Mon, 19 Sep 2022 at 1:30 PM, shiva singh <shivas...@gmail.com> wrote:
hello everyone please help me how can solve this problem:-image.jpeg 

--

Mohammad Ehsan Ansari

unread,
Sep 19, 2022, 2:30:46 PM9/19/22
to Django users
Hi SessionStore is a model class? if yes you can use pk instant of id
Reply all
Reply to author
Forward
0 new messages