You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

20 lines
480 B

from datetime import timedelta as td
from django import forms
TIMEOUT_CHOICES = (
("15 minutes", td(minutes=15)),
("30 minutes", td(minutes=30)),
("1 hour", td(hours=1)),
("3 hours", td(hours=3)),
("6 hours", td(hours=6)),
("12 hours", td(hours=12)),
("1 day", td(days=1)),
("2 days", td(days=2)),
("3 days", td(days=3)),
("1 week", td(weeks=1))
)
class TimeoutForm(forms.Form):
timeout = forms.ChoiceField(choices=TIMEOUT_CHOICES)