codeforlife-portal 8.8.0__py2.py3-none-any.whl → 8.8.1__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.8.0
3
+ Version: 8.8.1
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.8.0
16
+ Requires-Dist: cfl-common==8.8.1
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.8.0; extra == "dev"
87
+ Requires-Dist: cfl-common==8.8.1; 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.8.0.dist-info/licenses/LICENSE.md,sha256=9AbRlCDqD2D1tPibimysFv3zg3AIc49-eyv9aEsyq9w,115
90
+ codeforlife_portal-8.8.1.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,7 +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
+ deploy/middleware/tmp_basic_auth.py,sha256=FmPw8XVovt7iS7iLxZAWSejWLHzzmjmA-SC8IESohEM,1435
103
103
  deploy/static/apple-touch-icon-120x120.png,sha256=7GwelKO6CNbvjJJ1nqMvDGkPoQWqYomMKKP5EB5gmfM,24583
104
104
  deploy/static/apple-touch-icon-152x152.png,sha256=V57OGP0VeeKHen_iYVa72sHe_rEaMAJzU1FAiHWWBwY,36276
105
105
  deploy/static/apple-touch-icon-180x180.png,sha256=OIm3wwx0aL8fh1EIlMCKp2vVNpsuY-NDxV1QR73bf1g,47948
@@ -112,7 +112,7 @@ example_project/portal_test_settings.py,sha256=AaXwSSB2A6qu6My_7cBciQa_jONy084uq
112
112
  example_project/settings.py,sha256=RRSHhAgJVDn4uNZG395V6_Td7jwsSaBGNwQBZ_KJm0Y,5973
113
113
  example_project/urls.py,sha256=FUTzHPlUS1O5kqMHjL5V4L552N2ln7uTDXcw9wjKUto,422
114
114
  example_project/wsgi.py,sha256=U1W6WzZxZaIdYZ5tks7w9fqp5WS5qvn2iThsVcskrWw,829
115
- portal/__init__.py,sha256=lyCx9SueHF5AFRlBGLEidJOtooEa78uAc6Lvwe0BHU0,22
115
+ portal/__init__.py,sha256=CYHRW7OT0rtrYP93UfZNuT4545JeoLfz4o_ztXhQMCw,22
116
116
  portal/admin.py,sha256=RKJizTF6dPJKmGPZw7nZUM0X8jkiTjgyKhLQxtvHJ0I,6148
117
117
  portal/app_settings.py,sha256=8P3r0ArkOzL_iVjoaLIHsNWG4uP1tT2z1kCUHPhAZ9s,714
118
118
  portal/backends.py,sha256=2Dss6_WoQwPuDzJUF1yEaTQTNG4eUrD12ujJQ5cp5Tc,812
@@ -635,7 +635,7 @@ portal/views/two_factor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG
635
635
  portal/views/two_factor/core.py,sha256=Lk32z2SN2Pg0rRkK-N-LXMvXC1kKKsH3l692kiSDQ4E,964
636
636
  portal/views/two_factor/form.py,sha256=lnHNKI-BMlpncTuW3zUzjPaJJNuEra2I_nOam0eOKFY,257
637
637
  portal/views/two_factor/profile.py,sha256=SHSg_xHccE5PtD-OfuOkYhREYz_er4bj5ro1RjJ88Yw,393
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,,
638
+ codeforlife_portal-8.8.1.dist-info/METADATA,sha256=VyRaxvyZFc7PDneYrstzeSWkOb7dBZmd6SYIFYE45v0,13661
639
+ codeforlife_portal-8.8.1.dist-info/WHEEL,sha256=JNWh1Fm1UdwIQV075glCn4MVuCRs0sotJIq-J6rbxCU,109
640
+ codeforlife_portal-8.8.1.dist-info/top_level.txt,sha256=8e5pdsuIoTqEAMqpelHBjGjLbffcBtgOoggmd2q7nMw,41
641
+ codeforlife_portal-8.8.1.dist-info/RECORD,,
@@ -6,6 +6,7 @@ from portal.app_settings import TMP_AUTH_TOKEN
6
6
  class TempBasicAuthMiddleware:
7
7
  """
8
8
  Middleware used as a basic auth for the new OTP app until we switch to the main domain.
9
+ Only meant for use in OTP, so include this in MIDDLEWARES only in OTP settings, not GCP.
9
10
  Remove this middleware once the switch is done.
10
11
  """
11
12
 
@@ -18,24 +19,19 @@ class TempBasicAuthMiddleware:
18
19
  url = request.build_absolute_uri()
19
20
  temp_domain = "https://www.code4life.education"
20
21
 
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)
22
+ # If the user inputs the token in the URL correctly, set a cookie to the token's value
23
+ if url == f"{temp_domain}/{TMP_AUTH_TOKEN}":
24
+ response = redirect(temp_domain)
25
+ response.set_cookie(
26
+ key="TMP_AUTH_TOKEN",
27
+ value=TMP_AUTH_TOKEN,
28
+ )
29
+ return response
30
+ # For any other request in the code4life domain, check that a cookie with the token's value exists.
31
+ # Redirect to the main site if it doesn't.
32
+ else:
33
+ value = request.COOKIES.get("TMP_AUTH_TOKEN")
34
+ if value is not None and value == TMP_AUTH_TOKEN:
35
+ return self.get_response(request)
36
+
37
+ return redirect("https://www.codeforlife.education")
portal/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "8.8.0"
1
+ __version__ = "8.8.1"