-
Notifications
You must be signed in to change notification settings - Fork 113
Initialize setting review / proposal stage page #782
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 2 commits
1497d90
f3095e6
8bb98fb
57d036c
e3fcda2
2881ea9
db4fea7
6ef2f5b
211bf3c
048c941
76c39dc
fdd09ab
8ade9c1
cfb5fa1
afaf6d5
88ee598
9ef909e
d579e69
2fb312d
500b9db
ced5b07
928e2d1
32f30a1
c4ef31e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -310,16 +310,31 @@ def review_stages(request): | |
| ] | ||
|
|
||
| if request.method == 'POST': | ||
| date_time_obj = date_preprocess( | ||
| DATETIME_INPUT_FORMATS, request.POST['proposals.disable.after']) | ||
| tz_selectd = pytz.timezone(request.POST['review_timezone']) | ||
| loc_dt = tz_selectd.localize(date_time_obj).strftime( | ||
| '%Y-%m-%d %H:%M:%S%z') | ||
|
|
||
| for tag in review_stages_var: | ||
| key = settings.CONFERENCE_DEFAULT_SLUG + '.' + tag | ||
| if (tag == 'proposals.disable.after'): | ||
| value = loc_dt | ||
| if(request.POST['proposals.disable.after'] == ""): | ||
| continue | ||
| else: | ||
| date_time_obj = date_preprocess( | ||
| DATETIME_INPUT_FORMATS, | ||
| request.POST['proposals.disable.after']) | ||
| if(date_time_obj is None): | ||
| messages.error(request,'Please input valid date format : " + "%Y-%m-%dT%H:%M') | ||
| return render( | ||
| request, 'reviews/review_stages.html', { | ||
| 'timezones': pytz.common_timezones, | ||
| 'review_stages_list': review_stages_list, | ||
| 'current_review_stages_setting': current_review_stages_setting, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you go to this path, I think this is some kind of duplicate code of the normal |
||
| **reviews_state()._asdict() | ||
| }) | ||
| continue | ||
| else: | ||
| tz_selectd = pytz.timezone(request.POST['review_timezone']) | ||
| loc_dt = tz_selectd.localize(date_time_obj).strftime( | ||
| '%Y-%m-%d %H:%M:%S%z') | ||
| value = loc_dt | ||
| elif (tag == 'reviews.stage'): | ||
| value = int(request.POST[tag]) | ||
| else: | ||
|
|
@@ -356,4 +371,5 @@ def date_preprocess(DATETIME_INPUT_FORMATS, value): | |
| return datetime.datetime.strptime(value, format) | ||
| except (ValueError, TypeError): | ||
| continue | ||
| raise ValidationError("Please input valid date format : " + "%Y-%m-%dT%H:%M") | ||
| return None | ||
| # raise ValidationError("Please input valid date format : " + "%Y-%m-%dT%H:%M") | ||
Uh oh!
There was an error while loading. Please reload this page.