|
23 | 23 | from ietf.utils.draft import Draft |
24 | 24 |
|
25 | 25 |
|
26 | | -CUTOFF_HOUR = 17 |
27 | | - |
28 | | - |
29 | 26 | class UploadForm(forms.Form): |
30 | 27 |
|
31 | 28 | txt = forms.FileField(label=u'.txt format', required=True) |
@@ -54,17 +51,20 @@ def __init__(self, *args, **kwargs): |
54 | 51 | def read_dates(self): |
55 | 52 | now = datetime.datetime.utcnow() |
56 | 53 | first_cut_off = Meeting.get_first_cut_off() |
| 54 | + print "first_cut_off:", first_cut_off |
57 | 55 | second_cut_off = Meeting.get_second_cut_off() |
| 56 | + print "second_cut_off:", second_cut_off |
58 | 57 | ietf_monday = Meeting.get_ietf_monday() |
| 58 | + print "ietf_monday:", ietf_monday |
59 | 59 |
|
60 | 60 | if now.date() >= first_cut_off and now.date() < second_cut_off: # We are in the first_cut_off |
61 | | - if now.date() == first_cut_off and now.hour < CUTOFF_HOUR: |
| 61 | + if now.date() == first_cut_off and now.hour < settings.CUTOFF_HOUR: |
62 | 62 | self.cutoff_warning = 'The pre-meeting cutoff date for new documents (i.e., version -00 Internet-Drafts) is %s at 5 PM (PT). You will not be able to submit a new document after this time until %s, at midnight' % (first_cut_off, ietf_monday) |
63 | 63 | else: # No 00 version allowed |
64 | 64 | self.cutoff_warning = 'The pre-meeting cutoff date for new documents (i.e., version -00 Internet-Drafts) was %s at 5 PM (PT). You will not be able to submit a new document until %s, at midnight.<br>You can still submit a version -01 or higher Internet-Draft until 5 PM (PT), %s' % (first_cut_off, ietf_monday, second_cut_off) |
65 | 65 | self.in_first_cut_off = True |
66 | 66 | elif now.date() >= second_cut_off and now.date() < ietf_monday: |
67 | | - if now.date() == second_cut_off and now.hour < CUTOFF_HOUR: # We are in the first_cut_off yet |
| 67 | + if now.date() == second_cut_off and now.hour < settings.CUTOFF_HOUR: # We are in the first_cut_off yet |
68 | 68 | self.cutoff_warning = 'The pre-meeting cutoff date for new documents (i.e., version -00 Internet-Drafts) was %s at 5 PM (PT). You will not be able to submit a new document until %s, at midnight.<br>The I-D submission tool will be shut down at 5 PM (PT) today, and reopened at midnight (PT), %s' % (first_cut_off, ietf_monday, ietf_monday) |
69 | 69 | self.in_first_cut_off = True |
70 | 70 | else: # Completely shut down of the tool |
|
0 commit comments