kumidc/authentication/helpers/session.py

6 lines
173 B
Python
Raw Normal View History

2022-08-04 11:15:10 +00:00
from django.utils import timezone
2022-08-04 13:04:28 +00:00
def session_expiry(start=None, validity=timezone.timedelta(seconds=300)):
start = start or timezone.now()
2022-08-04 11:15:10 +00:00
return start + validity