I'm currently working on a mobile app development and using Django for backend (and Kivy for GUI frontend) services and database and trying to use sessions for login purposes.
As I'm compiling the app from the terminal, everytime I launch build and launch it, try to log in, a new session is created. I can see that in the database as I'm the only one to test it and that there are more than 100 rows in django.session table. The server is locally runned.
So what I do, at the moment is:
get request to check if something is stored in request.session['used_id']
if nothing then display signin/signup forms and in this case, I created a new session at the login.
Actually I've no idea on how I can use sessions to stay connected for my tests in the terminal. In the future, let users stay connected on the app on their devices might be an issue too but I've already that asnwer that can be very useful. Is there a way to do that?
Thank you!
question from:
https://stackoverflow.com/questions/65884508/use-django-sessions-for-requests-not-from-a-browser-terminal-mobile-app 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…