kumidc/authentication/helpers/session.py
2022-08-04 15:04:28 +02:00

6 lines
173 B
Python

from django.utils import timezone
def session_expiry(start=None, validity=timezone.timedelta(seconds=300)):
start = start or timezone.now()
return start + validity