Abduboriy
where to store jwt tokens after login - in browser cookie, local storage or db?
Abduboriy
the cookie is best choice
thanks. But after logout view how we can check token, i guess from payloud?
Hasan
thanks. But after logout view how we can check token, i guess from payloud?
one of the front end jobs is to remove token from cookie but, I don't lknow about back end maybe you should put in blacklist
Victor
Can django handle 50000 transaction parallel at the same time
totally depends on your available resources...
Christo
where to store jwt tokens after login - in browser cookie, local storage or db?
Jwt tokens are meant to be stored in frontend local storage
Charly
it's bad practice
No it's not, is how they are supposed to work
NK TRIPLLE
No it's not, is how they are supposed to work
i think http only cookie the best choice
Charly
i think http only cookie the best choice
No because APIs dont often use cookies
NK TRIPLLE
Charly
it's subjective
It's not! is a fact
Charly
Specifically the jwt in DRF doesnt ses cookies at all
NK TRIPLLE
cj
where to store jwt tokens after login - in browser cookie, local storage or db?
you shouldn't save JWT in any persistence storage, you should keep them as a parameter in your request
Charly
hahaahaha, ok
Itś not an opinion, really, jsut check it most APis (good ones) use headers to pass auth tokens, not cookies
cj
it's subjective
actually if you have to rely on cookies while using an API, you're using API wrong or you have a very rare uncommon edge case
NK TRIPLLE
I have read many articles on this topic, storing jwt in localstorage is a bad practice, at least in view of xss
NK TRIPLLE
https://medium.com/kanlanc/heres-why-storing-jwt-in-local-storage-is-a-great-mistake-df01dad90f9e
cj
Nope, you should save it to use it on multiple requests
you could save it somewhere that doesn't rely in persistence, because JWT expires —if you set it and using JWT correctly— so there's no need to store them in a persistent DB, browser's localstorage is kinda persistent
cj
yes but it doesn;t expire after one use
JWT are meant to be used as single-use-auth token ¯\_(ツ)_/¯ not to preserve a session
cj
but again, you CAN, but you SHOULDN'T
Charly
but again, you CAN, but you SHOULDN'T
In that sense we shouldnt ise jwt as an authentications thing and just for identity
cj
yes but it doesn;t expire after one use
that's why you have ACCESS_TOKEN and REFRESH_TOKEN (previous reply was to the wrong message)
IT
i am working in djngo , admin can i find member for help in django project form his group
.
i am working in djngo , admin can i find member for help in django project form his group
Just ask straight away here what problem you’re facing in detail.
dani
hi, somebody now how to use one variable from a script of js into a view in django due to my varibale is located in a <script> en a yemplate of django
dani
icuz i want to use the value from de varibale in a queryset
Aastha
I am getting django-admin error , how to solve it
Doragonsureiyā
I am getting django-admin error , how to solve it
Read this please: http://catb.org/~esr/faqs/smart-questions.html#intro
Doragonsureiyā
icuz i want to use the value from de varibale in a queryset
Rule 5️⃣: Never post walls of text or screen photos. Use paste bins like https://linkode.org, https://nekobin.com (or your favorite one)
R
For phone number
R
Field
Christo
How do you expect the views to be??? i mean like: Viewsets, class based views, function based views
Christo
Plz mention the view.py function also
if you don't want to overide the functionality use generic viewsets or api views. even if you have to do it manually you can do it just like any other field. Client.objects.create(phone="9876543210")
yuliaa.
Hello, I'm having an issue with my malfunctioning link rel. It's not able to call .css and .js files, even though I have programmed it correctly. Then, I tried deleting all my browser history, but the problem got worse as my Bootstrap is also not being called. Please help🙏🏼
Daler
"even though I have programmed it correctly" - most likely you have not programmed it correctly
Drag
I saw the resource in that chat which says that Django doesnt like a mongodb, can someone resend it pls?
Drag
type mongodb in the searchbar
Ooh, and type there???
Madara uchiha
Hi is django provide and feasibility of two models having common Table in database For example I have table foo Having model Class foo(models.Model) … Want to create another model class and do all the same operations except insert
Madara uchiha
Yes model proxy but the problem is that table used in other sub projects
Bandar
Hello friends I got question I have app that takes in image as “POST” since db isn’t option how do I go about saving and retrieving the image ? Thank you 🙏
Bandar
Using DRF
Soragan
i am try to create an url dispatcher regex to match a fixed 4 char only but having issue
Soragan
path('<slug:bcode:[a-zA-Z]{4}>-<slug:pcode>/
Soragan
any clue what’s wrong?
Tiger
Hello friends. I have data in excel file with rows more than 120,000. I want to transfer it into my database. How should I do that? The documentation suggests using json file by saving it in fixtures folder. But it requires more time, since i will have to create json file several times because it has limit up to 4mb.
Duc
Hello guys I'm actuall learning django from scratch and I have trouble with my code I can't post pictures here can someone help here
Duc
sure. what problem do you have?
Okay thanks can I send you my screen shot in pv !
The Inspired
sure
The Inspired
Hello friends. I have data in excel file with rows more than 120,000. I want to transfer it into my database. How should I do that? The documentation suggests using json file by saving it in fixtures folder. But it requires more time, since i will have to create json file several times because it has limit up to 4mb.
You can use a SQL statement to do it. http://web.archive.org/web/20101030205652/http://ensode.net/postgresql_csv_import.html Alternatively, use a Database Manager like DBeaver which provides a GUI to make the process easier
Ti
Hello guy! I try to use filterset with multi table. How can I find an example about it?
Doragonsureiyā
Okay thanks can I send you my screen shot in pv !
Rule 5️⃣: Never post walls of text or screen photos. Use paste bins like https://linkode.org, https://nekobin.com (or your favorite one)
Amnas
Can I extend files inside a directory in the templates folder to the base.html
Doragonsureiyā
Okay thanks can I send you my screen shot in pv !
Can i send you a private message? No. We do not provide one-on-one tutoring, hire someone if you need it. Questions are better answered in public so that everyone can learn.
Doragonsureiyā
Okay thanks can I send you my screen shot in pv !
Rule 5️⃣: Never post walls of text or screen photos. Use paste bins like https://linkode.org, https://nekobin.com (or your favorite one)
Suren
Hi, what is the best way to add second language to the website?
Its me
Can anyone tell me how to use sqlalchemy within the django project or any other alternatives of sqlalchemy other than django orm?
Ashish
Server side processing datatables. How to get ajax data?