Abduboriy
where to store jwt tokens after login - in browser cookie, local storage or db?
Hasan
Victor
Christo
NK TRIPLLE
NK TRIPLLE
Charly
NK TRIPLLE
Charly
Specifically the jwt in DRF doesnt ses cookies at all
NK TRIPLLE
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
Charly
cj
NK TRIPLLE
I have read many articles on this topic, storing jwt in localstorage is a bad practice, at least in view of xss
Charly
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
Charly
Charly
Charly
cj
but again, you CAN, but you SHOULDN'T
Charly
cj
cj
Charly
IT
i am working in djngo , admin can i find member for help in django project form his group
.
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
Felipe
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
R
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?
Maxim
Drag
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
Adorilson
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
Daler
Daler
Bandar
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
The Inspired
The Inspired
sure
The Inspired
Ti
Hello guy! I try to use filterset with multi table. How can I find an example about it?
Amnas
Can I extend files inside a directory in the templates folder to the base.html
Anonymous
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?
Neeraj