0

How can i run my server in a long time ? It's Django admin with runserver. It's stop. Thanks you

Run: $ python manage.py runserver in 24hours for exemple. https://code.sololearn.com/Wzf7nIuypZwC/?ref=app

21st Jul 2022, 3:35 PM
Malick Diagne
Malick Diagne - avatar
6 Respuestas
0
Your request will be served as soon as it returns a response. If you want to keep it running, spin up a new process in the server and set up a WebRTC connection to the client.
21st Jul 2022, 4:41 PM
Mustafa A
Mustafa A - avatar
0
I have something like http://127.0.0.1:8000/admin/ request I don't know how i can spin a new process webRTC Thanks you
21st Jul 2022, 8:37 PM
Malick Diagne
Malick Diagne - avatar
0
What exactly are you trying to do?
21st Jul 2022, 8:39 PM
Mustafa A
Mustafa A - avatar
0
Are you trying to login?
21st Jul 2022, 8:41 PM
Mustafa A
Mustafa A - avatar
0
Good morning I try to spin this request http://127.0.0.1:8000/admin/ one hour for exemple. It's my server django admin in my computer. It's login database. Thanks you
22nd Jul 2022, 7:06 AM
Malick Diagne
Malick Diagne - avatar
0
If you want a user session (keep the user logged in for a while), then you need a server session. https://docs.djangoproject.com/en/4.0/topics/http/sessions/ Or use JWT access tokens if you want it to be stateless. https://simpleisbetterthancomplex.com/tutorial/2018/12/19/how-to-use-jwt-authentication-with-django-rest-framework.html
22nd Jul 2022, 7:20 AM
Mustafa A
Mustafa A - avatar