Answers for "django flush sessions on server startup"

0

django flush sessions on server startup

#!/bin/sh

# clear django_session table
DJANGO_SETTINGS_MODULE="myproj.settings" \
  python -c 'from django.contrib.sessions.models import Session; \
    Session.objects.all().delete()' 
python manage.py runserver
Posted by: Guest on February-12-2020

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language