6 lines
No EOL
173 B
Python
6 lines
No EOL
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 |