session id attribute error

2022-09-19 Thread shiva singh
hello everyone please help me how can solve this problem:-[image: 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+unsubscr...@googlegr

Re: session id attribute error

2022-09-19 Thread Muhammad Juwaini Abdul Rahman
That was user, so probably you need request.user.id, not session. On Mon, 19 Sept 2022 at 16:00, shiva singh wrote: > hello everyone please help me how can solve this problem:-[image: > image.jpeg] > > -- > You received this message because you are subscribed to the Google Groups > "Django users

Re: makemigrations

2022-09-19 Thread Joel Wembo
Django can't add a new field by itself without null values being allowed here, especially when you have unique=True set on this field. To solve that issue, you have to perform it in steps: 1. Add a column with null=True or without unique=True and with some default value 2. Make sure th

Re: session id attribute error

2022-09-19 Thread Aashish Kumar
Do this request.session.get(‘id’) On Mon, 19 Sep 2022 at 1:30 PM, shiva singh wrote: > hello everyone please help me how can solve this problem:-[image: > image.jpeg] > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from

Re: session id attribute error

2022-09-19 Thread Mohammad Ehsan Ansari
Hi SessionStore is a model class? if yes you can use pk instant of id On Monday, 19 September 2022 at 22:48:02 UTC+5:30 aashishk...@gmail.com wrote: > Do this > > request.session.get(‘id’) > > On Mon, 19 Sep 2022 at 1:30 PM, shiva singh wrote: > >> hello everyone please help me how can solve

Re: DRF and React - request.user is "Anonymous user"

2022-09-19 Thread Mohammad Ehsan Ansari
make sure you have listed auth as jwt and added permission class for authentication On Monday, 12 September 2022 at 09:52:22 UTC+5:30 jacks...@gmail.com wrote: > I have used simple JWT for authentication and i have successfully logged > in and am getting tokens also. But when i do a request.us

Re: DRF and React - request.user is "Anonymous user"

2022-09-19 Thread Jackson Patrick
Do i need to pass token in headers? On Tue, 20 Sep, 2022, 9:44 am Mohammad Ehsan Ansari, wrote: > make sure you have listed auth as jwt and added permission class for > authentication > > On Monday, 12 September 2022 at 09:52:22 UTC+5:30 jacks...@gmail.com > wrote: > >> I have used simple JWT fo

Re: DRF and React - request.user is "Anonymous user"

2022-09-19 Thread Mohammad Ehsan Ansari
yes you need On Tue, 20 Sept 2022 at 09:49, Jackson Patrick wrote: > Do i need to pass token in headers? > > On Tue, 20 Sep, 2022, 9:44 am Mohammad Ehsan Ansari, > wrote: > >> make sure you have listed auth as jwt and added permission class for >> authentication >> >> On Monday, 12 September 20

SessionStore attribute error

2022-09-19 Thread shiva singh
hello everyone please help how can solve this problem? this is session code:- if user.password==password and user.role=="Company": com=Company.objects.get(user_id=user) request.session['id']=user.id request.session['role']=user.role

Re: SessionStore attribute error

2022-09-19 Thread 'Kasper Laudrup' via Django users
On 20/09/2022 08.21, shiva singh wrote: hello everyone please help how can solve this problem? I suggest you ignore all the replies you've already gotten and then post the exact same question a third time. Kind regards, Kasper Laudrup -- You received this message because you are subscribed