codeforlife-portal 8.7.9__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.
- {codeforlife_portal-8.7.9.dist-info → codeforlife_portal-8.8.0.dist-info}/METADATA +3 -3
- {codeforlife_portal-8.7.9.dist-info → codeforlife_portal-8.8.0.dist-info}/RECORD +9 -8
- deploy/middleware/tmp_basic_auth.py +41 -0
- portal/__init__.py +1 -1
- portal/app_settings.py +2 -0
- portal/tests/test_teacher.py +1 -0
- {codeforlife_portal-8.7.9.dist-info → codeforlife_portal-8.8.0.dist-info}/WHEEL +0 -0
- {codeforlife_portal-8.7.9.dist-info → codeforlife_portal-8.8.0.dist-info}/licenses/LICENSE.md +0 -0
- {codeforlife_portal-8.7.9.dist-info → codeforlife_portal-8.8.0.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: codeforlife-portal
|
|
3
|
-
Version: 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,7 +13,7 @@ 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.
|
|
16
|
+
Requires-Dist: cfl-common==8.8.0
|
|
17
17
|
Requires-Dist: charset-normalizer==3.4.2; python_version >= "3.7"
|
|
18
18
|
Requires-Dist: click==8.2.1; python_version >= "3.10"
|
|
19
19
|
Requires-Dist: click-didyoumean==0.3.1; python_full_version >= "3.6.2"
|
|
@@ -84,7 +84,7 @@ Requires-Dist: asttokens==3.0.0; python_version >= "3.8" and extra == "dev"
|
|
|
84
84
|
Requires-Dist: attrs==25.3.0; python_version >= "3.8" and extra == "dev"
|
|
85
85
|
Requires-Dist: black==25.1.0; python_version >= "3.9" and extra == "dev"
|
|
86
86
|
Requires-Dist: certifi==2025.6.15; python_version >= "3.7" and extra == "dev"
|
|
87
|
-
Requires-Dist: cfl-common==8.
|
|
87
|
+
Requires-Dist: cfl-common==8.8.0; extra == "dev"
|
|
88
88
|
Requires-Dist: charset-normalizer==3.4.2; python_version >= "3.7" and extra == "dev"
|
|
89
89
|
Requires-Dist: click==8.2.1; python_version >= "3.10" and extra == "dev"
|
|
90
90
|
Requires-Dist: coverage[toml]==7.9.2; 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.
|
|
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=
|
|
115
|
+
portal/__init__.py,sha256=lyCx9SueHF5AFRlBGLEidJOtooEa78uAc6Lvwe0BHU0,22
|
|
115
116
|
portal/admin.py,sha256=RKJizTF6dPJKmGPZw7nZUM0X8jkiTjgyKhLQxtvHJ0I,6148
|
|
116
|
-
portal/app_settings.py,sha256=
|
|
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=
|
|
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.
|
|
638
|
-
codeforlife_portal-8.
|
|
639
|
-
codeforlife_portal-8.
|
|
640
|
-
codeforlife_portal-8.
|
|
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.
|
|
1
|
+
__version__ = "8.8.0"
|
portal/app_settings.py
CHANGED
portal/tests/test_teacher.py
CHANGED
|
@@ -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
|
|
|
File without changes
|
{codeforlife_portal-8.7.9.dist-info → codeforlife_portal-8.8.0.dist-info}/licenses/LICENSE.md
RENAMED
|
File without changes
|
|
File without changes
|