Skip to content

Commit e2b3180

Browse files
authored
Merge pull request pycontw#731 from MadRex2000/add-remote-option
add remote policy option in tutorial form
2 parents 3729056 + 30cfa76 commit e2b3180

File tree

9 files changed

+1047
-454
lines changed

9 files changed

+1047
-454
lines changed
252 Bytes
Binary file not shown.

src/locale/en_US/LC_MESSAGES/django.po

Lines changed: 604 additions & 258 deletions
Large diffs are not rendered by default.
238 Bytes
Binary file not shown.

src/locale/zh_Hant/LC_MESSAGES/django.po

Lines changed: 431 additions & 192 deletions
Large diffs are not rendered by default.

src/proposals/forms/mixins.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,4 +222,9 @@ class Meta:
222222
"target='_blank' rel='noopener'>Markdown</a>. "
223223
"This is NOT made public and for REVIEW ONLY."
224224
),
225+
'remoting_policy': _(
226+
"Whether you agree to deliver the tutorial remotely if the epidemic "
227+
"(coronavirus) is still raging this August?"
228+
229+
),
225230
}

src/proposals/forms/proposals.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def __init__(self, *args, **kwargs):
5656
class Meta(TutorialProposalMixin.Meta):
5757
fields = [
5858
'title', 'category', 'duration', 'language',
59-
'python_level', 'recording_policy'
59+
'python_level', 'recording_policy', 'remoting_policy'
6060
]
6161

6262

@@ -103,7 +103,7 @@ class Meta(TutorialProposalMixin.Meta):
103103
fields = [
104104
'title', 'category', 'duration', 'language',
105105
'abstract', 'python_level', 'objective', 'detailed_description',
106-
'outline', 'supplementary', 'recording_policy', 'slide_link',
106+
'outline', 'supplementary', 'recording_policy', 'remoting_policy', 'slide_link',
107107
]
108108

109109

src/proposals/tests/forms/test_proposal.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,15 @@ def tutorial_proposal_data():
6666
'language': 'ZHZH',
6767
'python_level': 'INTERMEDIATE',
6868
'recording_policy': True,
69+
'remoting_policy': True,
6970
}
7071

7172

7273
def test_tutorial_proposal_create_form():
7374
form = TutorialProposalCreateForm()
7475
assert list(form.fields) == [
7576
'title', 'category', 'duration', 'language',
76-
'python_level', 'recording_policy',
77+
'python_level', 'recording_policy', 'remoting_policy',
7778
]
7879

7980

@@ -123,7 +124,7 @@ def test_tutorial_proposal_update_form():
123124
assert list(form.fields) == [
124125
'title', 'category', 'duration', 'language',
125126
'abstract', 'python_level', 'objective', 'detailed_description',
126-
'outline', 'supplementary', 'recording_policy', 'slide_link',
127+
'outline', 'supplementary', 'recording_policy', 'remoting_policy', 'slide_link',
127128
]
128129

129130

src/proposals/tests/views/test_create.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ def test_tutorial_proposal_create_post(agreed_user, agreed_user_client):
122122
'language': 'ZHZH',
123123
'python_level': 'INTERMEDIATE',
124124
'recording_policy': True,
125+
'remoting_policy': True,
125126
}, follow=True)
126127

127128
proposal = TutorialProposal.objects.get(

src/proposals/tests/views/test_edit.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ def test_tutorial_proposal_edit_post(agreed_user_client, tutorial_proposal):
187187
'language': 'ZHZH',
188188
'python_level': 'INTERMEDIATE',
189189
'recording_policy': True,
190+
'remoting_policy': True,
190191
'abstract': (
191192
"In the modern world, programmer’s time is more expensive than "
192193
"computer’s time. Better maintainability saves more. To improve "

0 commit comments

Comments
 (0)