codeforlife-portal 8.9.1__py2.py3-none-any.whl → 8.9.2__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.9.1
3
+ Version: 8.9.2
4
4
  Classifier: Programming Language :: Python
5
5
  Classifier: Programming Language :: Python :: 3.12
6
6
  Classifier: Framework :: Django
@@ -14,7 +14,7 @@ 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.8.3; python_version >= "3.7"
16
16
  Requires-Dist: cffi==1.17.1; platform_python_implementation != "PyPy"
17
- Requires-Dist: cfl-common==8.9.1
17
+ Requires-Dist: cfl-common==8.9.2
18
18
  Requires-Dist: charset-normalizer==3.4.3; python_version >= "3.7"
19
19
  Requires-Dist: click==8.2.1; python_version >= "3.10"
20
20
  Requires-Dist: click-didyoumean==0.3.1; python_full_version >= "3.6.2"
@@ -88,7 +88,7 @@ Requires-Dist: attrs==25.3.0; python_version >= "3.8" and extra == "dev"
88
88
  Requires-Dist: black==25.1.0; python_version >= "3.9" and extra == "dev"
89
89
  Requires-Dist: certifi==2025.8.3; python_version >= "3.7" and extra == "dev"
90
90
  Requires-Dist: cffi==1.17.1; platform_python_implementation != "PyPy" and extra == "dev"
91
- Requires-Dist: cfl-common==8.9.1; extra == "dev"
91
+ Requires-Dist: cfl-common==8.9.2; extra == "dev"
92
92
  Requires-Dist: charset-normalizer==3.4.3; python_version >= "3.7" and extra == "dev"
93
93
  Requires-Dist: click==8.2.1; python_version >= "3.10" and extra == "dev"
94
94
  Requires-Dist: coverage[toml]==7.10.3; python_version >= "3.9" and extra == "dev"
@@ -88,7 +88,7 @@ cfl_common/common/tests/utils/organisation.py,sha256=vNgKFtU3VPcWRnZfh82yCS90PLA
88
88
  cfl_common/common/tests/utils/student.py,sha256=PLd980iSlxmMoB8J3C2pVjNC5xHdVxfAkJXzhv_dRhg,3814
89
89
  cfl_common/common/tests/utils/teacher.py,sha256=KQ_NAl4yQqiX_zwcULQjkovc29JPhnkLR5Nk3Ljzbpg,2661
90
90
  cfl_common/common/tests/utils/user.py,sha256=NvLzZLVP4jy5Hn1iztOYF_BTQ9WsbSmuWMEzGzhAsRU,919
91
- codeforlife_portal-8.9.1.dist-info/licenses/LICENSE.md,sha256=9AbRlCDqD2D1tPibimysFv3zg3AIc49-eyv9aEsyq9w,115
91
+ codeforlife_portal-8.9.2.dist-info/licenses/LICENSE.md,sha256=9AbRlCDqD2D1tPibimysFv3zg3AIc49-eyv9aEsyq9w,115
92
92
  deploy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
93
93
  deploy/captcha.py,sha256=MbOBuGnbT_SOIltSjP1XMOLrfo1DldCilaVAEim0vM4,23
94
94
  deploy/views.py,sha256=7mY2zNPkaBFrlWGByJHp2zFqHIHSMc0YArjE_sFWMMU,131
@@ -100,7 +100,7 @@ deploy/middleware/maintenance.py,sha256=JhlQD7FowzxnRxk1_uGXYRQ2Aas6v3C9BRxYgN1H
100
100
  deploy/middleware/screentime_warning.py,sha256=-YmaOn9_RQwTU8C6VxDLWct_0G3Y5oHjAv9AvKZSvIw,1152
101
101
  deploy/middleware/security.py,sha256=LOZ-OUFo2dVhbRzI_KdSCMh4TItcJhhqzZg5zNAH-6Q,870
102
102
  deploy/middleware/session_timeout.py,sha256=Vfl6_9d8KwPsWRvCIcpBm7kWjgvHC8I7exJOejbyI4k,1023
103
- deploy/middleware/tmp_basic_auth.py,sha256=FmPw8XVovt7iS7iLxZAWSejWLHzzmjmA-SC8IESohEM,1435
103
+ deploy/middleware/tmp_basic_auth.py,sha256=TJm-xRZCAWZ3BWUqxKMFMlhz22bL_niI9RZ_SeP-q4A,1417
104
104
  deploy/static/apple-touch-icon-120x120.png,sha256=7GwelKO6CNbvjJJ1nqMvDGkPoQWqYomMKKP5EB5gmfM,24583
105
105
  deploy/static/apple-touch-icon-152x152.png,sha256=V57OGP0VeeKHen_iYVa72sHe_rEaMAJzU1FAiHWWBwY,36276
106
106
  deploy/static/apple-touch-icon-180x180.png,sha256=OIm3wwx0aL8fh1EIlMCKp2vVNpsuY-NDxV1QR73bf1g,47948
@@ -110,10 +110,10 @@ deploy/static/robots.txt,sha256=5cS4RITuQhbpNzvpk4AyDCXdlIBfmfCoBYRvCHY2VT8,24
110
110
  deploy/templates/deploy/csrf_failure.html,sha256=-pBRPn4Y7nUdYHGpTHCokT9Boi-isuwuivF8V2K1SgM,412
111
111
  example_project/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
112
112
  example_project/portal_test_settings.py,sha256=_6EDMwnYH2yCukgiop0sobqShbB8tivO9hcjZUYReec,7909
113
- example_project/settings.py,sha256=IsicdosIyB_3K2sv60bQvhAm6qm5fYWYut7oWTDZ778,6214
113
+ example_project/settings.py,sha256=DQkHGjS-NYIPTCOnCD7QBeV7rxTNdIGqdC-qfTuA5qU,6278
114
114
  example_project/urls.py,sha256=FUTzHPlUS1O5kqMHjL5V4L552N2ln7uTDXcw9wjKUto,422
115
115
  example_project/wsgi.py,sha256=U1W6WzZxZaIdYZ5tks7w9fqp5WS5qvn2iThsVcskrWw,829
116
- portal/__init__.py,sha256=qbri2C4n2eoGzq_GLHEbyjEIx6WIa1m6AniM3pGkLlo,22
116
+ portal/__init__.py,sha256=Rq9p7o79TIqi2cXgqOt5XpbOnfnnhHF-gOCVAB_dods,22
117
117
  portal/admin.py,sha256=RKJizTF6dPJKmGPZw7nZUM0X8jkiTjgyKhLQxtvHJ0I,6148
118
118
  portal/app_settings.py,sha256=8P3r0ArkOzL_iVjoaLIHsNWG4uP1tT2z1kCUHPhAZ9s,714
119
119
  portal/backends.py,sha256=2Dss6_WoQwPuDzJUF1yEaTQTNG4eUrD12ujJQ5cp5Tc,812
@@ -636,7 +636,7 @@ portal/views/two_factor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG
636
636
  portal/views/two_factor/core.py,sha256=Lk32z2SN2Pg0rRkK-N-LXMvXC1kKKsH3l692kiSDQ4E,964
637
637
  portal/views/two_factor/form.py,sha256=lnHNKI-BMlpncTuW3zUzjPaJJNuEra2I_nOam0eOKFY,257
638
638
  portal/views/two_factor/profile.py,sha256=SHSg_xHccE5PtD-OfuOkYhREYz_er4bj5ro1RjJ88Yw,393
639
- codeforlife_portal-8.9.1.dist-info/METADATA,sha256=pgmwPhBOVCQu448cW8Xpzhjyz6AJGlHrQaLQpfFrgCg,14175
640
- codeforlife_portal-8.9.1.dist-info/WHEEL,sha256=JNWh1Fm1UdwIQV075glCn4MVuCRs0sotJIq-J6rbxCU,109
641
- codeforlife_portal-8.9.1.dist-info/top_level.txt,sha256=8e5pdsuIoTqEAMqpelHBjGjLbffcBtgOoggmd2q7nMw,41
642
- codeforlife_portal-8.9.1.dist-info/RECORD,,
639
+ codeforlife_portal-8.9.2.dist-info/METADATA,sha256=3XVRBuG4ukzgJZComcqEdwlmzu3ByObQThzyBqJKjls,14175
640
+ codeforlife_portal-8.9.2.dist-info/WHEEL,sha256=JNWh1Fm1UdwIQV075glCn4MVuCRs0sotJIq-J6rbxCU,109
641
+ codeforlife_portal-8.9.2.dist-info/top_level.txt,sha256=8e5pdsuIoTqEAMqpelHBjGjLbffcBtgOoggmd2q7nMw,41
642
+ codeforlife_portal-8.9.2.dist-info/RECORD,,
@@ -17,17 +17,17 @@ class TempBasicAuthMiddleware:
17
17
  def __call__(self, request):
18
18
  # Code to be executed on each request.
19
19
  url = request.build_absolute_uri()
20
- temp_domain = "https://www.code4life.education"
20
+ token_in_url = f"/{TMP_AUTH_TOKEN}"
21
21
 
22
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)
23
+ if url.endswith(token_in_url):
24
+ response = redirect(url.replace(token_in_url, ""))
25
25
  response.set_cookie(
26
26
  key="TMP_AUTH_TOKEN",
27
27
  value=TMP_AUTH_TOKEN,
28
28
  )
29
29
  return response
30
- # For any other request in the code4life domain, check that a cookie with the token's value exists.
30
+ # For any other request in the domain, check that a cookie with the token's value exists.
31
31
  # Redirect to the main site if it doesn't.
32
32
  else:
33
33
  value = request.COOKIES.get("TMP_AUTH_TOKEN")
@@ -120,6 +120,7 @@ MIDDLEWARE = [
120
120
  "django.middleware.locale.LocaleMiddleware",
121
121
  "django.middleware.common.CommonMiddleware",
122
122
  "django.middleware.csrf.CsrfViewMiddleware",
123
+ "deploy.middleware.tmp_basic_auth.TempBasicAuthMiddleware",
123
124
  "deploy.middleware.security.CustomSecurityMiddleware",
124
125
  "django.contrib.messages.middleware.MessageMiddleware",
125
126
  "django.contrib.auth.middleware.AuthenticationMiddleware",
portal/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "8.9.1"
1
+ __version__ = "8.9.2"