codeforlife-portal 8.0.6__py2.py3-none-any.whl → 8.1.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.
- cfl_common/common/migrations/0056_set_non_school_teachers_as_non_admins.py +25 -0
- cfl_common/common/migrations/0057_teacher_teacher__is_admin.py +19 -0
- cfl_common/common/models.py +11 -0
- {codeforlife_portal-8.0.6.dist-info → codeforlife_portal-8.1.0.dist-info}/METADATA +1 -1
- {codeforlife_portal-8.0.6.dist-info → codeforlife_portal-8.1.0.dist-info}/RECORD +11 -9
- portal/__init__.py +1 -1
- portal/templates/portal/partials/footer.html +2 -0
- portal/templates/portal/partials/header.html +3 -0
- {codeforlife_portal-8.0.6.dist-info → codeforlife_portal-8.1.0.dist-info}/LICENSE.md +0 -0
- {codeforlife_portal-8.0.6.dist-info → codeforlife_portal-8.1.0.dist-info}/WHEEL +0 -0
- {codeforlife_portal-8.0.6.dist-info → codeforlife_portal-8.1.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
from django.apps.registry import Apps
|
|
2
|
+
from django.db import migrations
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
def set_non_school_teachers_as_non_admins(apps: Apps, *args):
|
|
6
|
+
Teacher = apps.get_model("common", "Teacher")
|
|
7
|
+
|
|
8
|
+
Teacher.objects.filter(
|
|
9
|
+
is_admin=True,
|
|
10
|
+
school__isnull=True,
|
|
11
|
+
).update(is_admin=False)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class Migration(migrations.Migration):
|
|
15
|
+
|
|
16
|
+
dependencies = [
|
|
17
|
+
("common", "0055_alter_schoolteacherinvitation_token"),
|
|
18
|
+
]
|
|
19
|
+
|
|
20
|
+
operations = [
|
|
21
|
+
migrations.RunPython(
|
|
22
|
+
code=set_non_school_teachers_as_non_admins,
|
|
23
|
+
reverse_code=migrations.RunPython.noop,
|
|
24
|
+
),
|
|
25
|
+
]
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Generated by Django 4.2.17 on 2025-01-13 17:34
|
|
2
|
+
|
|
3
|
+
from django.db import migrations, models
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class Migration(migrations.Migration):
|
|
7
|
+
|
|
8
|
+
dependencies = [
|
|
9
|
+
("common", "0056_set_non_school_teachers_as_non_admins"),
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
operations = [
|
|
13
|
+
migrations.AddConstraint(
|
|
14
|
+
model_name="teacher",
|
|
15
|
+
constraint=models.CheckConstraint(
|
|
16
|
+
check=models.Q(("is_admin", True), ("school__isnull", True), _negated=True), name="teacher__is_admin"
|
|
17
|
+
),
|
|
18
|
+
),
|
|
19
|
+
]
|
cfl_common/common/models.py
CHANGED
|
@@ -126,6 +126,17 @@ class Teacher(models.Model):
|
|
|
126
126
|
|
|
127
127
|
objects = TeacherModelManager()
|
|
128
128
|
|
|
129
|
+
class Meta:
|
|
130
|
+
constraints = [
|
|
131
|
+
models.CheckConstraint(
|
|
132
|
+
check=~models.Q(
|
|
133
|
+
school__isnull=True,
|
|
134
|
+
is_admin=True,
|
|
135
|
+
),
|
|
136
|
+
name="teacher__is_admin",
|
|
137
|
+
)
|
|
138
|
+
]
|
|
139
|
+
|
|
129
140
|
def teaches(self, userprofile):
|
|
130
141
|
if hasattr(userprofile, "student"):
|
|
131
142
|
student = userprofile.student
|
|
@@ -6,7 +6,7 @@ cfl_common/common/apps.py,sha256=49UXZ3bSkFKvIEOL4zM7y1sAhccQJyRtsoOg5XVd_8Y,129
|
|
|
6
6
|
cfl_common/common/context_processors.py,sha256=X0iuX5qu9kMWa7q8osE9CJ2LgM7pPOYQFGdjm8X3rk0,236
|
|
7
7
|
cfl_common/common/csp_config.py,sha256=9ECOLnp60ENRFAYEEIoYOMhqQzLgfKA-wkWxeUBwDrQ,2824
|
|
8
8
|
cfl_common/common/mail.py,sha256=pIRfUMVoJWxdv74UqToj_0_pTVTC51z6QlFVLI3QBOw,6874
|
|
9
|
-
cfl_common/common/models.py,sha256=
|
|
9
|
+
cfl_common/common/models.py,sha256=_uD8pIO5fGVbOD8NydJVIzpiEDAaR2hIfpOhDT6jB34,16106
|
|
10
10
|
cfl_common/common/permissions.py,sha256=gC6RQGZI2QDBbglx-xr_V4Hl2C2nf1V2_uPmEuoEcJo,2416
|
|
11
11
|
cfl_common/common/utils.py,sha256=Nn2Npao9Uqad5Js_IdHwF-ow6wrPNpBLW4AO1LxoEBc,1727
|
|
12
12
|
cfl_common/common/helpers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -69,6 +69,8 @@ cfl_common/common/migrations/0052_add_cse_fields.py,sha256=NhUkkcu2EBzJFhewCTccQ
|
|
|
69
69
|
cfl_common/common/migrations/0053_clean_class_data.py,sha256=lBKlDa49YwT660o-Ot6IYe4I1KfervTn4uAijda0nyw,584
|
|
70
70
|
cfl_common/common/migrations/0054_delete_aimmo_models.py,sha256=fmn4mDdlHr5DhPbIl_ygvGwWVFD8TZHAgQ6VUQQgCx8,415
|
|
71
71
|
cfl_common/common/migrations/0055_alter_schoolteacherinvitation_token.py,sha256=lzPAMaI3zU_q25RuIos_LV97NXOa3MIn_eWaEL71Y4I,403
|
|
72
|
+
cfl_common/common/migrations/0056_set_non_school_teachers_as_non_admins.py,sha256=_BrC9yfSYpP-c7EGFZmz8a4Kx_SxnRhpLMxJ70RVFOY,603
|
|
73
|
+
cfl_common/common/migrations/0057_teacher_teacher__is_admin.py,sha256=4pinm9T3JF3PRNLnbXI6mdFiNyxg1MnRs8lMKC4S5Bc,511
|
|
72
74
|
cfl_common/common/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
73
75
|
cfl_common/common/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
74
76
|
cfl_common/common/tests/test_migration_anonymise_orphan_schools.py,sha256=wJRyPgRvBsXLSCFdbBi2GXjgSgDbKUTRiM31CXIvpqs,1194
|
|
@@ -108,7 +110,7 @@ example_project/portal_test_settings.py,sha256=7Q7SdosA0Ba85qz-xkAe3EHyMPpSIQ61C
|
|
|
108
110
|
example_project/settings.py,sha256=NjFhtDNLwdY5vhUAtqk9a9m3GRfcuWRVqIqnJ3u0o6E,5658
|
|
109
111
|
example_project/urls.py,sha256=FUTzHPlUS1O5kqMHjL5V4L552N2ln7uTDXcw9wjKUto,422
|
|
110
112
|
example_project/wsgi.py,sha256=U1W6WzZxZaIdYZ5tks7w9fqp5WS5qvn2iThsVcskrWw,829
|
|
111
|
-
portal/__init__.py,sha256=
|
|
113
|
+
portal/__init__.py,sha256=c04nFsyfS0zYoDvZjLO-uEi12TFB5EWSD6fiWiI7OLQ,22
|
|
112
114
|
portal/admin.py,sha256=RKJizTF6dPJKmGPZw7nZUM0X8jkiTjgyKhLQxtvHJ0I,6148
|
|
113
115
|
portal/app_settings.py,sha256=DhWLQOwM0zVOXE3O5TNKbMM9K6agfLuCsHOdr1J7xEI,651
|
|
114
116
|
portal/backends.py,sha256=2Dss6_WoQwPuDzJUF1yEaTQTNG4eUrD12ujJQ5cp5Tc,812
|
|
@@ -469,8 +471,8 @@ portal/templates/portal/partials/card_list.html,sha256=yHcp4oc0WRG9H6Ek871VCHbwY
|
|
|
469
471
|
portal/templates/portal/partials/character_list.html,sha256=SnNFHzbIkOSaiRPIvSdplEf_B87UYgJ1pOvMltNDxLE,415
|
|
470
472
|
portal/templates/portal/partials/delete_popup.html,sha256=nEhnwgnmKoFzb6LlCwdX973Em9bVOFh6MON36RPteYs,1275
|
|
471
473
|
portal/templates/portal/partials/donate_popup.html,sha256=iPxXqIwZ-9_n4ssdUEiZ_GY3nbpes2AlcEKphL2Plno,2151
|
|
472
|
-
portal/templates/portal/partials/footer.html,sha256=
|
|
473
|
-
portal/templates/portal/partials/header.html,sha256=
|
|
474
|
+
portal/templates/portal/partials/footer.html,sha256=mJFsBJY1jfDUdujuceh0Y1bIXccIEWzbvEfsmNGl6D4,5036
|
|
475
|
+
portal/templates/portal/partials/header.html,sha256=Qba01GARPeb5XAbZkWY__vA7D1LMFJ39085bLlOkaM0,20643
|
|
474
476
|
portal/templates/portal/partials/headline.html,sha256=xKb-WtkT0FyQqT0smyNSKkXFvU7KQ5Czad8ca6YKQg4,89
|
|
475
477
|
portal/templates/portal/partials/hero_card.html,sha256=UN5hyxrw-McuXFsDzPBIECB9yGrv9VjsFf8SEBowwXc,786
|
|
476
478
|
portal/templates/portal/partials/info_popup.html,sha256=gzffd5MBVb7p2hGQuZMNDudThrRgs847hCu9ziT9uLE,566
|
|
@@ -631,8 +633,8 @@ portal/views/two_factor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG
|
|
|
631
633
|
portal/views/two_factor/core.py,sha256=Lk32z2SN2Pg0rRkK-N-LXMvXC1kKKsH3l692kiSDQ4E,964
|
|
632
634
|
portal/views/two_factor/form.py,sha256=lnHNKI-BMlpncTuW3zUzjPaJJNuEra2I_nOam0eOKFY,257
|
|
633
635
|
portal/views/two_factor/profile.py,sha256=SHSg_xHccE5PtD-OfuOkYhREYz_er4bj5ro1RjJ88Yw,393
|
|
634
|
-
codeforlife_portal-8.0.
|
|
635
|
-
codeforlife_portal-8.0.
|
|
636
|
-
codeforlife_portal-8.0.
|
|
637
|
-
codeforlife_portal-8.0.
|
|
638
|
-
codeforlife_portal-8.0.
|
|
636
|
+
codeforlife_portal-8.1.0.dist-info/LICENSE.md,sha256=9AbRlCDqD2D1tPibimysFv3zg3AIc49-eyv9aEsyq9w,115
|
|
637
|
+
codeforlife_portal-8.1.0.dist-info/METADATA,sha256=_DnDiw909XLtsqDhXKwDiG6Ye7lZ6rEV69WldEe0hSs,3078
|
|
638
|
+
codeforlife_portal-8.1.0.dist-info/WHEEL,sha256=Kh9pAotZVRFj97E15yTA4iADqXdQfIVTHcNaZTjxeGM,110
|
|
639
|
+
codeforlife_portal-8.1.0.dist-info/top_level.txt,sha256=8e5pdsuIoTqEAMqpelHBjGjLbffcBtgOoggmd2q7nMw,41
|
|
640
|
+
codeforlife_portal-8.1.0.dist-info/RECORD,,
|
portal/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "8.0
|
|
1
|
+
__version__ = "8.1.0"
|
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
<p><a class="freshdesk__contact-us">Help and support</a></p>
|
|
12
12
|
<p><a href="https://storage.googleapis.com/codeforlife-assets/impact_reports/impact_report_2023.pdf"
|
|
13
13
|
target="_blank">Impact Report 2023</a></p>
|
|
14
|
+
<p><a href="https://storage.googleapis.com/codeforlife-assets/impact_reports/impact_report_2024.pdf"
|
|
15
|
+
target="_blank">Impact Report 2024</a></p>
|
|
14
16
|
</div>
|
|
15
17
|
<div class="col-sm-4 col-xs-12">
|
|
16
18
|
<p><a href="{% url 'privacy_notice' %}">Privacy notice</a></p>
|
|
@@ -265,6 +265,9 @@
|
|
|
265
265
|
<a class="button button--menu__item" target="_blank"
|
|
266
266
|
href="https://storage.googleapis.com/codeforlife-assets/impact_reports/impact_report_2023.pdf">
|
|
267
267
|
Impact Report 2023<span class="material-icons-outlined md-32">chevron_right</span></a>
|
|
268
|
+
<a class="button button--menu__item" target="_blank"
|
|
269
|
+
href="https://storage.googleapis.com/codeforlife-assets/impact_reports/impact_report_2024.pdf">
|
|
270
|
+
Impact Report 2024<span class="material-icons-outlined md-32">chevron_right</span></a>
|
|
268
271
|
<a class="button button--menu__item optanon-toggle-display">Cookie settings
|
|
269
272
|
<span class="material-icons-outlined md-32">chevron_right</span></a>
|
|
270
273
|
<a class="button button--menu__item" href="{% url 'privacy_notice' %}">Privacy notice
|
|
File without changes
|
|
File without changes
|
|
File without changes
|