codeforlife-portal 8.7.8__py2.py3-none-any.whl → 8.8.0__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.4
2
2
  Name: codeforlife-portal
3
- Version: 8.7.8
3
+ Version: 8.8.0
4
4
  Classifier: Programming Language :: Python
5
5
  Classifier: Programming Language :: Python :: 3.12
6
6
  Classifier: Framework :: Django
@@ -13,12 +13,11 @@ Requires-Dist: boto3==1.36.14; python_version >= "3.8"
13
13
  Requires-Dist: botocore==1.36.26; python_version >= "3.8"
14
14
  Requires-Dist: celery[sqs]==5.4.0; python_version >= "3.8"
15
15
  Requires-Dist: certifi==2025.6.15; python_version >= "3.7"
16
- Requires-Dist: cfl-common==8.7.8
17
- Requires-Dist: chardet==5.2.0; python_version >= "3.7"
16
+ Requires-Dist: cfl-common==8.8.0
18
17
  Requires-Dist: charset-normalizer==3.4.2; python_version >= "3.7"
19
18
  Requires-Dist: click==8.2.1; python_version >= "3.10"
20
19
  Requires-Dist: click-didyoumean==0.3.1; python_full_version >= "3.6.2"
21
- Requires-Dist: click-plugins==1.1.1
20
+ Requires-Dist: click-plugins==1.1.1.2
22
21
  Requires-Dist: click-repl==0.3.0; python_version >= "3.6"
23
22
  Requires-Dist: diff-match-patch==20241021; python_version >= "3.7"
24
23
  Requires-Dist: django==5.1.10; python_version >= "3.10"
@@ -50,7 +49,7 @@ Requires-Dist: packaging==25.0; python_version >= "3.8"
50
49
  Requires-Dist: pandas==2.3.0; python_version >= "3.9"
51
50
  Requires-Dist: pgeocode==0.4.0; python_version >= "3.8"
52
51
  Requires-Dist: phonenumbers==8.12.12
53
- Requires-Dist: pillow==11.2.1; python_version >= "3.9"
52
+ Requires-Dist: pillow==11.3.0; python_version >= "3.9"
54
53
  Requires-Dist: prompt-toolkit==3.0.51; python_version >= "3.8"
55
54
  Requires-Dist: psycopg2-binary==2.9.9; python_version >= "3.7"
56
55
  Requires-Dist: pycurl==7.45.6
@@ -61,7 +60,7 @@ Requires-Dist: python-dotenv==1.0.1; python_version >= "3.8"
61
60
  Requires-Dist: pytz==2025.2
62
61
  Requires-Dist: pyyaml==6.0.2; python_version >= "3.8"
63
62
  Requires-Dist: qrcode==7.4.2; python_version >= "3.7"
64
- Requires-Dist: reportlab==4.2.5; python_version >= "3.7" and python_version < "4"
63
+ Requires-Dist: reportlab==4.4.2; python_version >= "3.7" and python_version < "4"
65
64
  Requires-Dist: requests==2.32.4; python_version >= "3.8"
66
65
  Requires-Dist: requests-toolbelt==1.0.0; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3"
67
66
  Requires-Dist: s3transfer==0.11.3; python_version >= "3.8"
@@ -72,7 +71,7 @@ Requires-Dist: tablib==3.7.0; python_version >= "3.9"
72
71
  Requires-Dist: typing-extensions==4.14.0; python_version >= "3.9"
73
72
  Requires-Dist: tzdata==2025.2; python_version >= "2"
74
73
  Requires-Dist: urllib3==2.5.0
75
- Requires-Dist: uvicorn==0.34.3; python_version >= "3.9"
74
+ Requires-Dist: uvicorn==0.35.0; python_version >= "3.9"
76
75
  Requires-Dist: uvicorn-worker==0.2.0; python_version >= "3.8"
77
76
  Requires-Dist: vine==5.1.0; python_version >= "3.6"
78
77
  Requires-Dist: wcwidth==0.2.13
@@ -85,10 +84,10 @@ Requires-Dist: asttokens==3.0.0; python_version >= "3.8" and extra == "dev"
85
84
  Requires-Dist: attrs==25.3.0; python_version >= "3.8" and extra == "dev"
86
85
  Requires-Dist: black==25.1.0; python_version >= "3.9" and extra == "dev"
87
86
  Requires-Dist: certifi==2025.6.15; python_version >= "3.7" and extra == "dev"
88
- Requires-Dist: cfl-common==8.7.8; extra == "dev"
87
+ Requires-Dist: cfl-common==8.8.0; extra == "dev"
89
88
  Requires-Dist: charset-normalizer==3.4.2; python_version >= "3.7" and extra == "dev"
90
89
  Requires-Dist: click==8.2.1; python_version >= "3.10" and extra == "dev"
91
- Requires-Dist: coverage[toml]==7.9.1; python_version >= "3.9" and extra == "dev"
90
+ Requires-Dist: coverage[toml]==7.9.2; python_version >= "3.9" and extra == "dev"
92
91
  Requires-Dist: decorator==5.2.1; python_version >= "3.8" and extra == "dev"
93
92
  Requires-Dist: diff-match-patch==20241021; python_version >= "3.7" and extra == "dev"
94
93
  Requires-Dist: django==5.1.10; python_version >= "3.10" and extra == "dev"
@@ -142,12 +141,12 @@ Requires-Dist: pytest-cov==6.2.1; python_version >= "3.9" and extra == "dev"
142
141
  Requires-Dist: pytest-django==4.8.0; python_version >= "3.8" and extra == "dev"
143
142
  Requires-Dist: pytest-mock==3.14.1; python_version >= "3.8" and extra == "dev"
144
143
  Requires-Dist: pytest-order==1.3.0; python_version >= "3.7" and extra == "dev"
145
- Requires-Dist: pytest-xdist==3.7.0; python_version >= "3.9" and extra == "dev"
144
+ Requires-Dist: pytest-xdist==3.8.0; python_version >= "3.9" and extra == "dev"
146
145
  Requires-Dist: python-dateutil==2.9.0.post0; (python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3") and extra == "dev"
147
146
  Requires-Dist: pytz==2025.2; extra == "dev"
148
147
  Requires-Dist: pyvirtualdisplay==3.0; extra == "dev"
149
148
  Requires-Dist: qrcode==7.4.2; python_version >= "3.7" and extra == "dev"
150
- Requires-Dist: rapid-router==7.5.15; extra == "dev"
149
+ Requires-Dist: rapid-router==7.5.16; extra == "dev"
151
150
  Requires-Dist: requests==2.32.4; python_version >= "3.8" and extra == "dev"
152
151
  Requires-Dist: responses==0.18.0; python_version >= "3.7" and extra == "dev"
153
152
  Requires-Dist: selenium==4.29.0; python_version >= "3.9" and extra == "dev"
@@ -87,7 +87,7 @@ cfl_common/common/tests/utils/organisation.py,sha256=vNgKFtU3VPcWRnZfh82yCS90PLA
87
87
  cfl_common/common/tests/utils/student.py,sha256=PLd980iSlxmMoB8J3C2pVjNC5xHdVxfAkJXzhv_dRhg,3814
88
88
  cfl_common/common/tests/utils/teacher.py,sha256=KQ_NAl4yQqiX_zwcULQjkovc29JPhnkLR5Nk3Ljzbpg,2661
89
89
  cfl_common/common/tests/utils/user.py,sha256=NvLzZLVP4jy5Hn1iztOYF_BTQ9WsbSmuWMEzGzhAsRU,919
90
- codeforlife_portal-8.7.8.dist-info/licenses/LICENSE.md,sha256=9AbRlCDqD2D1tPibimysFv3zg3AIc49-eyv9aEsyq9w,115
90
+ codeforlife_portal-8.8.0.dist-info/licenses/LICENSE.md,sha256=9AbRlCDqD2D1tPibimysFv3zg3AIc49-eyv9aEsyq9w,115
91
91
  deploy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
92
92
  deploy/captcha.py,sha256=MbOBuGnbT_SOIltSjP1XMOLrfo1DldCilaVAEim0vM4,23
93
93
  deploy/views.py,sha256=7mY2zNPkaBFrlWGByJHp2zFqHIHSMc0YArjE_sFWMMU,131
@@ -99,6 +99,7 @@ deploy/middleware/maintenance.py,sha256=JhlQD7FowzxnRxk1_uGXYRQ2Aas6v3C9BRxYgN1H
99
99
  deploy/middleware/screentime_warning.py,sha256=-YmaOn9_RQwTU8C6VxDLWct_0G3Y5oHjAv9AvKZSvIw,1152
100
100
  deploy/middleware/security.py,sha256=LOZ-OUFo2dVhbRzI_KdSCMh4TItcJhhqzZg5zNAH-6Q,870
101
101
  deploy/middleware/session_timeout.py,sha256=Vfl6_9d8KwPsWRvCIcpBm7kWjgvHC8I7exJOejbyI4k,1023
102
+ deploy/middleware/tmp_basic_auth.py,sha256=tGTPDjy1jWD8DUqaSys3qYcAfnxzPiBpDxR2vf7er-A,1560
102
103
  deploy/static/apple-touch-icon-120x120.png,sha256=7GwelKO6CNbvjJJ1nqMvDGkPoQWqYomMKKP5EB5gmfM,24583
103
104
  deploy/static/apple-touch-icon-152x152.png,sha256=V57OGP0VeeKHen_iYVa72sHe_rEaMAJzU1FAiHWWBwY,36276
104
105
  deploy/static/apple-touch-icon-180x180.png,sha256=OIm3wwx0aL8fh1EIlMCKp2vVNpsuY-NDxV1QR73bf1g,47948
@@ -111,9 +112,9 @@ example_project/portal_test_settings.py,sha256=AaXwSSB2A6qu6My_7cBciQa_jONy084uq
111
112
  example_project/settings.py,sha256=RRSHhAgJVDn4uNZG395V6_Td7jwsSaBGNwQBZ_KJm0Y,5973
112
113
  example_project/urls.py,sha256=FUTzHPlUS1O5kqMHjL5V4L552N2ln7uTDXcw9wjKUto,422
113
114
  example_project/wsgi.py,sha256=U1W6WzZxZaIdYZ5tks7w9fqp5WS5qvn2iThsVcskrWw,829
114
- portal/__init__.py,sha256=lOZl6FLNoFXhU2AK8ewdUUxme3XJ3uErzD42sO6XhLg,22
115
+ portal/__init__.py,sha256=lyCx9SueHF5AFRlBGLEidJOtooEa78uAc6Lvwe0BHU0,22
115
116
  portal/admin.py,sha256=RKJizTF6dPJKmGPZw7nZUM0X8jkiTjgyKhLQxtvHJ0I,6148
116
- portal/app_settings.py,sha256=DhWLQOwM0zVOXE3O5TNKbMM9K6agfLuCsHOdr1J7xEI,651
117
+ portal/app_settings.py,sha256=8P3r0ArkOzL_iVjoaLIHsNWG4uP1tT2z1kCUHPhAZ9s,714
117
118
  portal/backends.py,sha256=2Dss6_WoQwPuDzJUF1yEaTQTNG4eUrD12ujJQ5cp5Tc,812
118
119
  portal/beta.py,sha256=0TCC-9_KZoM1nuzJ9FiuKR5n9JITdMYenHGQtRvn9UU,255
119
120
  portal/context_processors.py,sha256=1TrUZqnMqGa5f7ERph9EpBqojSMJvOrcpnJzTdeCLDI,133
@@ -548,7 +549,7 @@ portal/tests/test_partials.py,sha256=cSLNLjdsriROjPxkZlM3HKD3CSKDuKgpaDIdL3fPyBs
548
549
  portal/tests/test_ratelimit.py,sha256=XWq1A9XgRrlcMHibGoJ0kc4gLc5U_u5UhKHjthxCfYA,19376
549
550
  portal/tests/test_school_student.py,sha256=bFZwY4twaFHQLp0cltMq8cLNDZGgCHTZBCZHK0JcV8s,8604
550
551
  portal/tests/test_security.py,sha256=FGrlRfnzi-Xx2_bn4fTZlYORKm7w_GhGkD3havvplwc,3239
551
- portal/tests/test_teacher.py,sha256=fYdqWYVT-EcWUzQBNZ5qOORO7UC_S14NtACx64Rsrbg,29159
552
+ portal/tests/test_teacher.py,sha256=8nvKZ9bIpuHRes3b9sFQhjgpk7Di22HtI_orJDMiGvc,29181
552
553
  portal/tests/test_teacher_student.py,sha256=4Di29Lsymbmh6WxZ0FYpqZ4fMN8NqNMTXXOsii1dfW4,21624
553
554
  portal/tests/test_views.py,sha256=Hv0rVOLmYivMqzJK1AQeRJ85YHTCRrlr12hcf1B83Bk,47566
554
555
  portal/tests/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -634,7 +635,7 @@ portal/views/two_factor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG
634
635
  portal/views/two_factor/core.py,sha256=Lk32z2SN2Pg0rRkK-N-LXMvXC1kKKsH3l692kiSDQ4E,964
635
636
  portal/views/two_factor/form.py,sha256=lnHNKI-BMlpncTuW3zUzjPaJJNuEra2I_nOam0eOKFY,257
636
637
  portal/views/two_factor/profile.py,sha256=SHSg_xHccE5PtD-OfuOkYhREYz_er4bj5ro1RjJ88Yw,393
637
- codeforlife_portal-8.7.8.dist-info/METADATA,sha256=CYKOpIvV-x-UrkpHhXQroCCPZKOV8BYgCa6MonNq8zE,13714
638
- codeforlife_portal-8.7.8.dist-info/WHEEL,sha256=JNWh1Fm1UdwIQV075glCn4MVuCRs0sotJIq-J6rbxCU,109
639
- codeforlife_portal-8.7.8.dist-info/top_level.txt,sha256=8e5pdsuIoTqEAMqpelHBjGjLbffcBtgOoggmd2q7nMw,41
640
- codeforlife_portal-8.7.8.dist-info/RECORD,,
638
+ codeforlife_portal-8.8.0.dist-info/METADATA,sha256=ZkuJQ5_mqldtSU8DXH8wr6r7lPXvvNieAPb657rmUWU,13661
639
+ codeforlife_portal-8.8.0.dist-info/WHEEL,sha256=JNWh1Fm1UdwIQV075glCn4MVuCRs0sotJIq-J6rbxCU,109
640
+ codeforlife_portal-8.8.0.dist-info/top_level.txt,sha256=8e5pdsuIoTqEAMqpelHBjGjLbffcBtgOoggmd2q7nMw,41
641
+ codeforlife_portal-8.8.0.dist-info/RECORD,,
@@ -0,0 +1,41 @@
1
+ from django.shortcuts import redirect
2
+
3
+ from portal.app_settings import TMP_AUTH_TOKEN
4
+
5
+
6
+ class TempBasicAuthMiddleware:
7
+ """
8
+ Middleware used as a basic auth for the new OTP app until we switch to the main domain.
9
+ Remove this middleware once the switch is done.
10
+ """
11
+
12
+ def __init__(self, get_response):
13
+ self.get_response = get_response
14
+ # One-time configuration and initialization.
15
+
16
+ def __call__(self, request):
17
+ # Code to be executed on each request.
18
+ url = request.build_absolute_uri()
19
+ temp_domain = "https://www.code4life.education"
20
+
21
+ # Only run this middleware on a request from the code4life domain
22
+ if url.startswith(temp_domain):
23
+
24
+ # If the user inputs the token in the URL correctly, set a cookie to the token's value
25
+ if url == f"{temp_domain}/{TMP_AUTH_TOKEN}":
26
+ response = redirect(temp_domain)
27
+ response.set_cookie(
28
+ key="TMP_AUTH_TOKEN",
29
+ value=TMP_AUTH_TOKEN,
30
+ )
31
+ return response
32
+ # For any other request in the code4life domain, check that a cookie with the token's value exists.
33
+ # Redirect to the main site if it doesn't.
34
+ else:
35
+ value = request.COOKIES.get("TMP_AUTH_TOKEN")
36
+ if value is not None and value == TMP_AUTH_TOKEN:
37
+ return self.get_response(request)
38
+
39
+ return redirect("https://www.codeforlife.education")
40
+
41
+ return self.get_response(request)
portal/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "8.7.8"
1
+ __version__ = "8.8.0"
portal/app_settings.py CHANGED
@@ -18,3 +18,5 @@ SESSION_EXPIRY_TIME = 60 * 30
18
18
 
19
19
  # One hour
20
20
  SCREENTIME_WARNING_EXPIRY_TIME = 60 * 60
21
+
22
+ TMP_AUTH_TOKEN = getattr(settings, "TMP_AUTH_TOKEN", "token")
@@ -667,6 +667,7 @@ class TestTeacherFrontend(BaseTest):
667
667
  join_teacher_to_organisation(joining_email, school.name)
668
668
 
669
669
  # refresh the page and scroll to the buttons
670
+ time.sleep(1)
670
671
  page.browser.find_element(By.CSS_SELECTOR, ".logo").click()
671
672
  page.browser.find_element(By.ID, "make_admin_button").click()
672
673