codeforlife-portal 7.4.2__py2.py3-none-any.whl → 7.4.4__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of codeforlife-portal might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: codeforlife-portal
3
- Version: 7.4.2
3
+ Version: 7.4.4
4
4
  Classifier: Programming Language :: Python
5
5
  Classifier: Programming Language :: Python :: 3.12
6
6
  Classifier: Framework :: Django
@@ -21,7 +21,7 @@ Requires-Dist: django-classy-tags==2.0.0
21
21
  Requires-Dist: libsass==0.23.0
22
22
  Requires-Dist: phonenumbers==8.12.12
23
23
  Requires-Dist: more-itertools==8.7.0
24
- Requires-Dist: cfl-common==7.4.2
24
+ Requires-Dist: cfl-common==7.4.4
25
25
  Requires-Dist: django-ratelimit==3.0.1
26
26
  Requires-Dist: django-preventconcurrentlogins==0.8.2
27
27
  Requires-Dist: django-csp==3.7
@@ -108,7 +108,7 @@ example_project/portal_test_settings.py,sha256=_gI7-HMoPJ-cDGO6n5UlEIHKHuTR5SC_X
108
108
  example_project/settings.py,sha256=HgGSG0n6Xggd0NieFVoJgn8vKGqyRbCddoB3CRuoT-Y,5640
109
109
  example_project/urls.py,sha256=3SsP5jvPAXV5xmduka4zbSZB5PbXggjsalu1ojY5KIo,434
110
110
  example_project/wsgi.py,sha256=U1W6WzZxZaIdYZ5tks7w9fqp5WS5qvn2iThsVcskrWw,829
111
- portal/__init__.py,sha256=sM2nJxMmGij5RSBxjI6nK_EBgrH8US-_qbfODFsue-A,22
111
+ portal/__init__.py,sha256=pRP-2U3JdKe9zc7kJ_hZIi8lzbrKlyH-LTC8oC216zs,22
112
112
  portal/admin.py,sha256=on1-zNRnZvf2cwBN6GVRVYRhkaksrCgfzX8XPWtkvz8,6062
113
113
  portal/app_settings.py,sha256=DhWLQOwM0zVOXE3O5TNKbMM9K6agfLuCsHOdr1J7xEI,651
114
114
  portal/backends.py,sha256=2Dss6_WoQwPuDzJUF1yEaTQTNG4eUrD12ujJQ5cp5Tc,812
@@ -126,7 +126,7 @@ portal/forms/invite_teacher.py,sha256=jkDNcCfkts4_lXRzhcI3xBam21Zn2yX9wMpMVhDtW1
126
126
  portal/forms/organisation.py,sha256=QcQyd7AiqBmvt4y8uQSQylguUbKOKqo2pjqWIkpWjDg,7433
127
127
  portal/forms/play.py,sha256=z9P5LzyS3jjYcnfco84d2x8ptgLxRmh94Dnj05plmbY,11505
128
128
  portal/forms/registration.py,sha256=gWcY7rllhWO3c9as6QHUDWZx1Jme7DqtGHYaKcvxe-U,5990
129
- portal/forms/teach.py,sha256=lFGM9gk1gC_N_qJhzV2VdAVArCiAYfhOmrxvPkYC-co,22446
129
+ portal/forms/teach.py,sha256=Fd7zOdwpKTFmxxa3q_Tsj1E9B_M5DZlStF5YXiCA-ys,22688
130
130
  portal/helpers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
131
131
  portal/helpers/captcha.py,sha256=Amwg3HZ9eIh1LGYVYWYruk1ccNj6P3nYP_evufOY8BY,254
132
132
  portal/helpers/decorators.py,sha256=AnHbcRg42cUYkpMnJMImEMueSKHZRBZ0o67B7_Wp_Zs,3695
@@ -435,7 +435,7 @@ portal/templates/captcha/includes/js_v2_invisible.html,sha256=FUyDf1RDyS7whzW2B_
435
435
  portal/templates/portal/about.html,sha256=_iD0GCP6q3-XuZ2LC-9O0KYY-mKL6c9qk3O-NRRqsRM,10321
436
436
  portal/templates/portal/base.html,sha256=4xLACNgKmRQTdEsdNNGYhLzMozzYzWIIzk31HrLGBf0,12109
437
437
  portal/templates/portal/base_no_userprofile.html,sha256=PlRufyYmUUGWBZ6CvbYhJWOMTqKqdcee4xnO5--AogA,447
438
- portal/templates/portal/coding_club.html,sha256=A9_hiD-ChBRnictFvAaQiSgSANfrnQ_zFY6hqBtK2rg,5767
438
+ portal/templates/portal/coding_club.html,sha256=CJS1dEKMQ70AQ9U05wTctmvXYJngs18qxbyzNJmkfHk,5449
439
439
  portal/templates/portal/contribute.html,sha256=UIC_N3Lun9wB_6jEra0wvlT9fDiiIeMby7_onXYo6k0,4176
440
440
  portal/templates/portal/dotmailer_consent_form.html,sha256=UDdizPoKYZGybr6z9nzDV4WPhJPa-S3bIKywvVgFrxg,918
441
441
  portal/templates/portal/email_invitation_sent.html,sha256=hAMzQXE3NFGnOsQlCGuo3Aps-vazSJb5BhAN7bWT48M,641
@@ -490,7 +490,7 @@ portal/templates/portal/tag_manager/tag_manager_head.html,sha256=kWQ4ccJ062cWRJO
490
490
  portal/templates/portal/teach/base_registering.html,sha256=jpANyRQbsmWO404l9Mez91zolNP9ic1khWi27WW0FMQ,582
491
491
  portal/templates/portal/teach/class.html,sha256=zir7a7y4hbg9E6-zFIC0iv8kccIzF-qkni4DXlvkjgM,6726
492
492
  portal/templates/portal/teach/dashboard.html,sha256=SwNdLbTDPaz0O7wVlSVkU8KwIWPzBYsOo6ysOxkOwOc,32674
493
- portal/templates/portal/teach/invited.html,sha256=OJ_b6JY6n0iIh6CzWTYTSxfQMIk-RRVgrRFlOr57GLU,3908
493
+ portal/templates/portal/teach/invited.html,sha256=lTsydONG5se1E099KaRgsxGuG12qVHxFUL2X0E3HBmQ,4188
494
494
  portal/templates/portal/teach/onboarding_classes.html,sha256=K212dunXG7eByyCg5lhv4ne-SniMz3kcKXrfianIY6g,2872
495
495
  portal/templates/portal/teach/onboarding_print.html,sha256=4vD2ZDNRxERNdCNj3ZNXJWYAFBQPn9C7Pzsz5TZjZHw,8862
496
496
  portal/templates/portal/teach/onboarding_school.html,sha256=EyvnQ13R4ovf3-152pCvjxJJIGeT47ygs0VU9ftvJlQ,2491
@@ -539,7 +539,7 @@ portal/tests/test_emails.py,sha256=pLr06j3uMBxP1raoZQWzUTBVFvsEDFtUh85J8OnqCwE,9
539
539
  portal/tests/test_global_forms.py,sha256=A5JpAe4AYK-wpu0o1qU4THmeNv_wr7lhzaMbjz5czpY,1543
540
540
  portal/tests/test_helper_methods.py,sha256=-SQCDZm2XUtyXGEp0CHIb_SSC9CPD-XOSnpnY8QclHk,890
541
541
  portal/tests/test_independent_student.py,sha256=NrRjTEr6V4WXpCE74N8LYNVocvLSvddkjuo3dYpfAZc,27245
542
- portal/tests/test_invite_teacher.py,sha256=oeOaoJV1IqJSYPlaPFjnhVXdB2mq8otCTLp_lfjuCfk,12224
542
+ portal/tests/test_invite_teacher.py,sha256=gUe1spFp60v3i6kMqGoNgJd0OlBEcwplPPNYLomTJS4,12269
543
543
  portal/tests/test_middleware.py,sha256=b6jfNmiRZ2snqLKsyJUG-RivoX5fmrqLlQkG9MeVnqM,8034
544
544
  portal/tests/test_organisation.py,sha256=kCMUNzLN6EzaMUBcFkqXwnqLGgOuQxQWIHHt63nhqBs,7574
545
545
  portal/tests/test_partials.py,sha256=cSLNLjdsriROjPxkZlM3HKD3CSKDuKgpaDIdL3fPyBs,1794
@@ -631,8 +631,8 @@ portal/views/two_factor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG
631
631
  portal/views/two_factor/core.py,sha256=O_wcBeFqdPYSGNGv-pT_vbs5-Dj1Z-Jfkd6f9-E5yZI,760
632
632
  portal/views/two_factor/form.py,sha256=lnHNKI-BMlpncTuW3zUzjPaJJNuEra2I_nOam0eOKFY,257
633
633
  portal/views/two_factor/profile.py,sha256=tkl_ludo8arMtd5LKNmohM66vpC_YQiP-0nspTSJiJ4,383
634
- codeforlife_portal-7.4.2.dist-info/LICENSE.md,sha256=9AbRlCDqD2D1tPibimysFv3zg3AIc49-eyv9aEsyq9w,115
635
- codeforlife_portal-7.4.2.dist-info/METADATA,sha256=MNGjSumPZ-NuAy21Z5JrTcZBPa-W_2kkQCNlD-cuOFE,3317
636
- codeforlife_portal-7.4.2.dist-info/WHEEL,sha256=fS9sRbCBHs7VFcwJLnLXN1MZRR0_TVTxvXKzOnaSFs8,110
637
- codeforlife_portal-7.4.2.dist-info/top_level.txt,sha256=8e5pdsuIoTqEAMqpelHBjGjLbffcBtgOoggmd2q7nMw,41
638
- codeforlife_portal-7.4.2.dist-info/RECORD,,
634
+ codeforlife_portal-7.4.4.dist-info/LICENSE.md,sha256=9AbRlCDqD2D1tPibimysFv3zg3AIc49-eyv9aEsyq9w,115
635
+ codeforlife_portal-7.4.4.dist-info/METADATA,sha256=6zjGdre0zyfkUoJ4UhpRSsjkhlQkQ_fAzCInBsi6lF0,3317
636
+ codeforlife_portal-7.4.4.dist-info/WHEEL,sha256=fS9sRbCBHs7VFcwJLnLXN1MZRR0_TVTxvXKzOnaSFs8,110
637
+ codeforlife_portal-7.4.4.dist-info/top_level.txt,sha256=8e5pdsuIoTqEAMqpelHBjGjLbffcBtgOoggmd2q7nMw,41
638
+ codeforlife_portal-7.4.4.dist-info/RECORD,,
portal/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "7.4.2"
1
+ __version__ = "7.4.4"
portal/forms/teach.py CHANGED
@@ -18,6 +18,13 @@ from portal.helpers.ratelimit import clear_ratelimit_cache_for_user
18
18
 
19
19
 
20
20
  class InvitedTeacherForm(forms.Form):
21
+ prefix = 'teacher_signup'
22
+
23
+ def __init__(self, *args, **kwargs):
24
+ super().__init__(*args, **kwargs)
25
+ for field_name, field in self.fields.items():
26
+ field.widget.attrs['id'] = f'id_teacher_signup-{field_name}'
27
+
21
28
  teacher_password = forms.CharField(
22
29
  help_text="Enter a password",
23
30
  widget=forms.PasswordInput(
@@ -42,7 +42,7 @@
42
42
  at home or in school, on or offline.
43
43
  </p>
44
44
  <p>
45
- View the resources <a target="_blank" href="https://code-for-life.gitbook.io/code-club-resources/">online here</a>.
45
+ View the resources <a target="_blank" href="https://code-for-life.gitbook.io/code-for-life-primary-club-resources">online here</a>.
46
46
  </p>
47
47
  </div>
48
48
  <div>
@@ -82,23 +82,23 @@
82
82
  try coding out. It is designed to be used in face-to-face or online clubs.
83
83
  </p>
84
84
  <p>
85
- View the resources <a target="_blank" href="https://code-for-life.gitbook.io/code-club-resources-intermediate/">online here</a>.
85
+ View the resources <a target="_blank" href="https://code-for-life.gitbook.io/code-for-life-python-club-resources">online here</a>.
86
86
  </p>
87
87
  </div>
88
88
  <div>
89
89
  <!-- TODO: improve responsiveness -->
90
90
  <div style="margin-bottom: 10px;">
91
- <a id="grass_snakes_pack" download class="button button--primary button--icon" href="https://3289537671-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS5kw31UTGL8CPHU9skBS%2Fuploads%2FKsC7tdyT6htj5JX1ig28%2FGrass%20Snakes%20Club.zip?alt=media&token=1f6e6f0e-1a10-4bef-a8f8-a20b0a59e4c0">
91
+ <a id="grass_snakes_pack" download class="button button--primary button--icon" href="https://content.gitbook.com/content/5508uzXa7roQPZikv2aI/blobs/kpNf9JheYqpbfjVWILfG/Grass%20Snakes%20Club.zip">
92
92
  Lvl 1: Grass Snakes<span class="iconify" data-icon="mdi:tray-arrow-down"></span>
93
93
  </a>
94
94
  </div>
95
95
  <div style="margin-bottom: 10px;">
96
- <a id="tiger_snakes_pack" download type="submit" class="button button--primary button--icon" href="https://3289537671-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS5kw31UTGL8CPHU9skBS%2Fuploads%2FSIeSsvz348nXjNMcVPxx%2FTiger%20Snakes%20Club.zip?alt=media&token=872b383f-a209-4864-a0e0-26d7ba3a8d74">
96
+ <a id="tiger_snakes_pack" download type="submit" class="button button--primary button--icon" href="https://content.gitbook.com/content/5508uzXa7roQPZikv2aI/blobs/AwIiOPatP90PeCOwzaPX/Tiger%20Snakes%20Club.zip">
97
97
  Lvl 2: Tiger Snakes<span class="iconify" data-icon="mdi:tray-arrow-down"></span>
98
98
  </a>
99
99
  </div>
100
100
  <div>
101
- <a id="cobra_snakes_pack" download type="submit" class="button button--primary button--icon" href="https://3289537671-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS5kw31UTGL8CPHU9skBS%2Fuploads%2FITTbTC8DVwr8LdCkN82d%2FCobra%20Club.zip?alt=media&token=bfd94842-cba9-45c7-892b-331bc82c33e9">
101
+ <a id="cobra_snakes_pack" download type="submit" class="button button--primary button--icon" href="https://content.gitbook.com/content/5508uzXa7roQPZikv2aI/blobs/KLfkfRtnmPBaexhhtrPO/Cobra%20Club.zip">
102
102
  Lvl 3: Cobra Snakes<span class="iconify" data-icon="mdi:tray-arrow-down"></span>
103
103
  </a>
104
104
  </div>
@@ -20,7 +20,7 @@
20
20
  </p>
21
21
  </div>
22
22
 
23
- <form class="d-flex flex-column" method="post" id="form-invited-teacher" autocomplete="off">
23
+ <form class="d-flex flex-column" method="post" id="teacher-register-form" autocomplete="off">
24
24
 
25
25
  {% csrf_token %}
26
26
 
@@ -29,7 +29,9 @@
29
29
  <div class="row form--row">
30
30
  <label for="{{ invited_teacher_form.teacher_password.auto_id }}"></label>
31
31
  <div class="input--icon">
32
- {{ invited_teacher_form.teacher_password }}<span class="iconify" data-icon="mdi:security"></span>
32
+ {{ invited_teacher_form.teacher_password }}
33
+ <span id="teacher-password-field-icon" class="iconify"
34
+ data-icon="material-symbols:visibility-off" ></span>
33
35
  </div>
34
36
  <small>{{ invited_teacher_form.teacher_password.help_text }}</small>
35
37
  {{ invited_teacher_form.teacher_password.errors }}
@@ -37,7 +39,9 @@
37
39
  <div class="row form--row">
38
40
  <label for="{{ invited_teacher_form.teacher_confirm_password.auto_id }}"></label>
39
41
  <div class="input--icon">
40
- {{ invited_teacher_form.teacher_confirm_password }}<span class="iconify" data-icon="mdi:security"></span>
42
+ {{ invited_teacher_form.teacher_confirm_password }}
43
+ <span id="teacher-confirm-password-field-icon" class="iconify"
44
+ data-icon="material-symbols:visibility-off" ></span>
41
45
  </div>
42
46
  <small>{{ invited_teacher_form.teacher_confirm_password.help_text }}</small>
43
47
  {{ invited_teacher_form.teacher_confirm_password.errors }}
@@ -73,10 +77,14 @@
73
77
  </div>
74
78
  </div>
75
79
 
76
- <script type="text/javascript" src="{% static 'portal/js/passwordStrength.js' %}"></script>
80
+ {% include "portal/partials/service_unavailable_popup.html" %}
81
+
77
82
  <script>
78
- var TEACHER_PASSWORD_FIELD_ID = '{{ invited_teacher_form.teacher_password.auto_id }}';
79
- var INDEP_STUDENT_PASSWORD_FIELD_ID = '{{ invited_teacher_form.teacher_password.auto_id }}';
83
+ const password_id = '{{ invited_teacher_form.teacher_password.auto_id }}';
84
+ var TEACHER_PASSWORD_FIELD_ID = password_id;
85
+ var INDEP_STUDENT_PASSWORD_FIELD_ID = password_id;
80
86
  </script>
81
87
 
82
- {% endblock content %}
88
+ <script type="text/javascript" src="{% static 'portal/js/passwordStrength.js' %}"></script>
89
+
90
+ {% endblock content %}
@@ -63,9 +63,9 @@ class TestInviteTeacher(TestCase):
63
63
  response = client.post(
64
64
  invitation_url,
65
65
  {
66
- "teacher_password": invited_teacher_password,
67
- "teacher_confirm_password": invited_teacher_password,
68
- "consent_ticked": "on",
66
+ "teacher_signup-teacher_password": invited_teacher_password,
67
+ "teacher_signup-teacher_confirm_password": invited_teacher_password,
68
+ "teacher_signup-consent_ticked": "on",
69
69
  },
70
70
  )
71
71