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

10 years ago
  1. from datetime import timedelta as td
  2. from django import forms
  3. TIMEOUT_CHOICES = (
  4. ("15 minutes", td(minutes=15)),
  5. ("30 minutes", td(minutes=30)),
  6. ("1 hour", td(hours=1)),
  7. ("3 hours", td(hours=3)),
  8. ("6 hours", td(hours=6)),
  9. ("12 hours", td(hours=12)),
  10. ("1 day", td(days=1)),
  11. ("2 days", td(days=2)),
  12. ("3 days", td(days=3)),
  13. ("1 week", td(weeks=1))
  14. )
  15. class TimeoutForm(forms.Form):
  16. timeout = forms.ChoiceField(choices=TIMEOUT_CHOICES)