codeforlife-portal 8.4.0__py2.py3-none-any.whl → 8.4.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.
- cfl_common/common/csp_config.py +2 -2
- {codeforlife_portal-8.4.0.dist-info → codeforlife_portal-8.4.2.dist-info}/METADATA +1 -1
- {codeforlife_portal-8.4.0.dist-info → codeforlife_portal-8.4.2.dist-info}/RECORD +13 -12
- portal/__init__.py +1 -1
- portal/templates/portal/play.html +1 -1
- portal/templates/portal/privacy_notice.html +0 -10
- portal/templates/portal/teach.html +3 -3
- portal/urls.py +15 -30
- portal/views/google_analytics.py +28 -0
- portal/views/legal.py +1 -1
- {codeforlife_portal-8.4.0.dist-info → codeforlife_portal-8.4.2.dist-info}/LICENSE.md +0 -0
- {codeforlife_portal-8.4.0.dist-info → codeforlife_portal-8.4.2.dist-info}/WHEEL +0 -0
- {codeforlife_portal-8.4.0.dist-info → codeforlife_portal-8.4.2.dist-info}/top_level.txt +0 -0
cfl_common/common/csp_config.py
CHANGED
|
@@ -49,8 +49,8 @@ CSP_STYLE_SRC = (
|
|
|
49
49
|
)
|
|
50
50
|
CSP_FRAME_SRC = (
|
|
51
51
|
"https://storage.googleapis.com/",
|
|
52
|
-
"https://2662351606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/"
|
|
53
|
-
"https://
|
|
52
|
+
"https://2662351606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/",
|
|
53
|
+
"https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/",
|
|
54
54
|
"https://www.recaptcha.net/",
|
|
55
55
|
"https://www.google.com/recaptcha/",
|
|
56
56
|
"https://crowdin.com/",
|
|
@@ -4,7 +4,7 @@ cfl_common/common/__init__.py,sha256=XlncBOpKp_gekbKH7Y_i6yu1qy5tJc3Y8sn8cDy-Vgk
|
|
|
4
4
|
cfl_common/common/app_settings.py,sha256=Bw1DXkZpNIdwUJ-cIOjZnngH5_NbMXC0koW7NgQ0pKY,2495
|
|
5
5
|
cfl_common/common/apps.py,sha256=49UXZ3bSkFKvIEOL4zM7y1sAhccQJyRtsoOg5XVd_8Y,129
|
|
6
6
|
cfl_common/common/context_processors.py,sha256=X0iuX5qu9kMWa7q8osE9CJ2LgM7pPOYQFGdjm8X3rk0,236
|
|
7
|
-
cfl_common/common/csp_config.py,sha256=
|
|
7
|
+
cfl_common/common/csp_config.py,sha256=SacWzX7Mo2saS8_GwYKulFK0A8gngd12QL15I2jwdco,2899
|
|
8
8
|
cfl_common/common/mail.py,sha256=pIRfUMVoJWxdv74UqToj_0_pTVTC51z6QlFVLI3QBOw,6874
|
|
9
9
|
cfl_common/common/models.py,sha256=_uD8pIO5fGVbOD8NydJVIzpiEDAaR2hIfpOhDT6jB34,16106
|
|
10
10
|
cfl_common/common/permissions.py,sha256=gC6RQGZI2QDBbglx-xr_V4Hl2C2nf1V2_uPmEuoEcJo,2416
|
|
@@ -111,7 +111,7 @@ example_project/portal_test_settings.py,sha256=mTyObCGkZEI0IQSZkqCjb1WZ7ebjQLwui
|
|
|
111
111
|
example_project/settings.py,sha256=pHQDI_A_yXV3u1efj689tc-vPI6nBFma4gMMPBzj0aI,5652
|
|
112
112
|
example_project/urls.py,sha256=FUTzHPlUS1O5kqMHjL5V4L552N2ln7uTDXcw9wjKUto,422
|
|
113
113
|
example_project/wsgi.py,sha256=U1W6WzZxZaIdYZ5tks7w9fqp5WS5qvn2iThsVcskrWw,829
|
|
114
|
-
portal/__init__.py,sha256=
|
|
114
|
+
portal/__init__.py,sha256=Vu2hvtSa_7OgifMH6YJWUWpnqSrh4JTb4Rb2mzFy0vo,22
|
|
115
115
|
portal/admin.py,sha256=RKJizTF6dPJKmGPZw7nZUM0X8jkiTjgyKhLQxtvHJ0I,6148
|
|
116
116
|
portal/app_settings.py,sha256=DhWLQOwM0zVOXE3O5TNKbMM9K6agfLuCsHOdr1J7xEI,651
|
|
117
117
|
portal/backends.py,sha256=2Dss6_WoQwPuDzJUF1yEaTQTNG4eUrD12ujJQ5cp5Tc,812
|
|
@@ -119,7 +119,7 @@ portal/beta.py,sha256=0TCC-9_KZoM1nuzJ9FiuKR5n9JITdMYenHGQtRvn9UU,255
|
|
|
119
119
|
portal/context_processors.py,sha256=1TrUZqnMqGa5f7ERph9EpBqojSMJvOrcpnJzTdeCLDI,133
|
|
120
120
|
portal/handlers.py,sha256=gF99OfQrGcIGDnUyONhvylZNU8sl6XHYEurwu0fuiss,422
|
|
121
121
|
portal/models.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
122
|
-
portal/urls.py,sha256=
|
|
122
|
+
portal/urls.py,sha256=BWhRI-9rGEydbasI0UCtYYASqHbyUXokfepNWty7cQg,18218
|
|
123
123
|
portal/wsgi.py,sha256=3yRcNxBQG30NhzrVi93bX-DrbXtsIQBc70HiW5wbOyE,401
|
|
124
124
|
portal/forms/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
125
125
|
portal/forms/admin.py,sha256=Cdl8-wvasAzvMfgUlFYzQjYeuyC7gIsSiy8V_-jMp7w,2080
|
|
@@ -452,14 +452,14 @@ portal/templates/portal/home.html,sha256=J10xWo7opn_BjQrdxpn0wg1bo6w4DwjpTEOJ-pk
|
|
|
452
452
|
portal/templates/portal/home_learning.html,sha256=U1_AYrTNLqCjla7-vdVkC6SOigGBAmu3kscuiYNH4rw,10070
|
|
453
453
|
portal/templates/portal/locked_out.html,sha256=JeiFHFyueFX03D54k82swjxvKY78cFG8Vre-bKKv_7Y,894
|
|
454
454
|
portal/templates/portal/locked_out_school_student.html,sha256=bcpLtu4mkHR-zILLuArtHH2OfUSjHiqntcdbTMlx5Kg,684
|
|
455
|
-
portal/templates/portal/play.html,sha256=
|
|
456
|
-
portal/templates/portal/privacy_notice.html,sha256=
|
|
455
|
+
portal/templates/portal/play.html,sha256=35dsR5jMavX5YvHZCwsoGdbCjEWJG-vPyqIeUAkgbLI,5724
|
|
456
|
+
portal/templates/portal/privacy_notice.html,sha256=qKInJE4fS82EIfpJEmHMsa_raA7YxYP4hyXWMekkCCk,53600
|
|
457
457
|
portal/templates/portal/register.html,sha256=4RqUxRiQOvd-oHAM5x6U01zdlYRfy-h8NUGl8UIiBC0,12531
|
|
458
458
|
portal/templates/portal/reset_password.html,sha256=YzsREz5D2OwhicMLahVOVDXiNDxoHlPqU5iu96i36W0,1373
|
|
459
459
|
portal/templates/portal/reset_password_confirm.html,sha256=jPHSDatezRXzCG4zH_5BQPWAxLblidqro0hzvsH54ho,3499
|
|
460
460
|
portal/templates/portal/reset_password_done.html,sha256=rpzN3svZne5H2FS3TJaGnHypRj2KX-SRS6DbFQkgLf0,667
|
|
461
461
|
portal/templates/portal/reset_password_email_sent.html,sha256=kwNvoH_M-Qd5s-g0HiULwfQt_SD12WEMgPRSnLmldTQ,914
|
|
462
|
-
portal/templates/portal/teach.html,sha256=
|
|
462
|
+
portal/templates/portal/teach.html,sha256=dD96PpZFdpYUMhkQxlf5luU56rePe4mZRGSkwyfkkRU,9342
|
|
463
463
|
portal/templates/portal/ten_year_map.html,sha256=_NxEXDJMGdtguuZ3vYl00yBgYo12wv1w8QJ-LMhw8fg,8390
|
|
464
464
|
portal/templates/portal/terms.html,sha256=ekhBnhJVHcr5BE5W4PZ-YNzGsmhvRTrj1gdpdNdSYRk,29314
|
|
465
465
|
portal/templates/portal/login/independent_student.html,sha256=G4u82m0lko4yQvqRDMger5p63A6KtFI_bsEOsQWlyJw,1777
|
|
@@ -611,8 +611,9 @@ portal/views/admin.py,sha256=4Xt3zEyQH7sUwQSrwuRtoCodWidjOzd7gJUwWU96pXY,957
|
|
|
611
611
|
portal/views/api.py,sha256=mdWmFkV5mxmR-mvj6ttIe8uwW9tbcx9-5ykk5dpX0LI,7047
|
|
612
612
|
portal/views/dotmailer.py,sha256=OH06IXuqqjhQbEie8g8y2ZY1oZvsCtNHhkQRLa-julg,2467
|
|
613
613
|
portal/views/email.py,sha256=V3wXRxIjeZ4OJBVqGCQrPn-GQWKZK1PCXbR1f2Zpa_4,2174
|
|
614
|
+
portal/views/google_analytics.py,sha256=cbNq9apCVpjoXCdovjrwo2jshWu5tUOItB-fTr-losw,769
|
|
614
615
|
portal/views/home.py,sha256=8leK4ADxRg-gK-bm7D08CR44bhV3I8lt5pCV59HXMkk,9619
|
|
615
|
-
portal/views/legal.py,sha256=
|
|
616
|
+
portal/views/legal.py,sha256=cSvnW_HtyEWlklg-BiF3iKl_xKhx-IHp-J2CcyJwI_w,348
|
|
616
617
|
portal/views/organisation.py,sha256=sPDbiM7hdtpF8GKyh_4n4VPl2a-WnAgnF4q9aSvQCVI,3341
|
|
617
618
|
portal/views/play_landing_page.py,sha256=FFmjUFub3ZdlbMqkB8yX3jAImCzqrUqgb8AZcpKywZ4,308
|
|
618
619
|
portal/views/registration.py,sha256=9cDKFVXVyJcMJBVZLwHoucMI4UwsOhbUxMdcxIEOixs,10889
|
|
@@ -633,8 +634,8 @@ portal/views/two_factor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG
|
|
|
633
634
|
portal/views/two_factor/core.py,sha256=Lk32z2SN2Pg0rRkK-N-LXMvXC1kKKsH3l692kiSDQ4E,964
|
|
634
635
|
portal/views/two_factor/form.py,sha256=lnHNKI-BMlpncTuW3zUzjPaJJNuEra2I_nOam0eOKFY,257
|
|
635
636
|
portal/views/two_factor/profile.py,sha256=SHSg_xHccE5PtD-OfuOkYhREYz_er4bj5ro1RjJ88Yw,393
|
|
636
|
-
codeforlife_portal-8.4.
|
|
637
|
-
codeforlife_portal-8.4.
|
|
638
|
-
codeforlife_portal-8.4.
|
|
639
|
-
codeforlife_portal-8.4.
|
|
640
|
-
codeforlife_portal-8.4.
|
|
637
|
+
codeforlife_portal-8.4.2.dist-info/LICENSE.md,sha256=9AbRlCDqD2D1tPibimysFv3zg3AIc49-eyv9aEsyq9w,115
|
|
638
|
+
codeforlife_portal-8.4.2.dist-info/METADATA,sha256=M6S_qIEDgS_J2O62FFjOgGsXNgUTs8gBj2xp60jpWBA,3077
|
|
639
|
+
codeforlife_portal-8.4.2.dist-info/WHEEL,sha256=WDDPHYzpiOIm6GP1C2_8y8W6q16ICddAgOHlhTje9Qc,109
|
|
640
|
+
codeforlife_portal-8.4.2.dist-info/top_level.txt,sha256=8e5pdsuIoTqEAMqpelHBjGjLbffcBtgOoggmd2q7nMw,41
|
|
641
|
+
codeforlife_portal-8.4.2.dist-info/RECORD,,
|
portal/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "8.4.
|
|
1
|
+
__version__ = "8.4.2"
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
</div>
|
|
45
45
|
</div>
|
|
46
46
|
<div class="col-sm-6">
|
|
47
|
-
<a href="https://
|
|
47
|
+
<a href="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdCZE3FuBgH5fHsGocKGv%2Fuploads%2FSEr3nRjqHATuyL3c4Zdt%2FCode%20for%20Life%20-%20Rapid%20Router%20for%20students.mp4?alt=media"
|
|
48
48
|
class="youtube">
|
|
49
49
|
<img src="{% static 'portal/img/thumbnail_play_rapid_router.png' %}"
|
|
50
50
|
alt="Image of Rapid Router game with try button in bottom right corner">
|
|
@@ -327,11 +327,6 @@
|
|
|
327
327
|
target="_blank">here</a>.
|
|
328
328
|
By accepting analytics / performance cookies on our portal, you consent to the processing of data about you
|
|
329
329
|
by Google in the manner and for the purposes set out above.</p>
|
|
330
|
-
<p><strong>YouTube</strong>. While embedded YouTube videos on our website do not use cookies, your browser's
|
|
331
|
-
Local Storage may be used by the video platform provider to enhance your viewing experience and collect
|
|
332
|
-
analytics data. This data enables the platform to track your interaction with the video content and may
|
|
333
|
-
gather information about your device and browsing behavior. The use of Local Storage by embedded video
|
|
334
|
-
providers is subject to their respective policies.</p>
|
|
335
330
|
|
|
336
331
|
<h6>6.4 Managing and disabling cookies</h6>
|
|
337
332
|
<p>We make available a cookie management platform on our portal (provided by
|
|
@@ -655,11 +650,6 @@
|
|
|
655
650
|
organisations who help them to interpret this information. They may also pass the information to other
|
|
656
651
|
organisations if the law says they have to do so. If you choose to allow analytics / performance cookies on
|
|
657
652
|
our site, you are consenting to Google using your data for the reasons above.</p>
|
|
658
|
-
<p><strong>YouTube</strong>. While embedded YouTube videos on our website do not use cookies, your browser's
|
|
659
|
-
Local Storage may be used by the video platform provider to enhance your viewing experience and collect
|
|
660
|
-
analytics data. This data enables the platform to track your interaction with the video content and may
|
|
661
|
-
gather information about your device and browsing behavior. The use of Local Storage by embedded video
|
|
662
|
-
providers is subject to their respective policies.</p>
|
|
663
653
|
|
|
664
654
|
<h6>Managing and disabling cookies</h6>
|
|
665
655
|
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
</div>
|
|
95
95
|
</div>
|
|
96
96
|
<div class="col-sm-6">
|
|
97
|
-
<a href="https://
|
|
97
|
+
<a href="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdCZE3FuBgH5fHsGocKGv%2Fuploads%2FpNFqak7cyoAenDK1PEOZ%2FCode%20for%20Life%20-%20Programming%20teaching%20resources.mp4?alt=media" class="youtube">
|
|
98
98
|
<img src="{% static 'portal/img/thumbnail_educate_resources.png' %}"
|
|
99
99
|
alt="Image of Code for Life Resources on Gitbook with play button in bottom right corner">
|
|
100
100
|
</a>
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
<div class="container">
|
|
108
108
|
<div class="row d-flex">
|
|
109
109
|
<div class="col-sm-6">
|
|
110
|
-
<a href="https://
|
|
110
|
+
<a href="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdCZE3FuBgH5fHsGocKGv%2Fuploads%2FrCbonCJjzNYlDTmvrPOA%2FCode%20for%20Life%20-%20Rapid%20Router%20for%20teachers.mp4?alt=media"
|
|
111
111
|
class="youtube">
|
|
112
112
|
<img src="{% static 'portal/img/thumbnail_educate_rapid_router.png' %}"
|
|
113
113
|
alt="Image of Rapid Router logo and game with play button in bottom right corner">
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
</div>
|
|
176
176
|
</div>
|
|
177
177
|
<div class="col-sm-6">
|
|
178
|
-
<a href="https://
|
|
178
|
+
<a href="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdCZE3FuBgH5fHsGocKGv%2Fuploads%2FB1XFzZC63IEYvYBzLFfC%2FPython_Den_teachers.mp4?alt=media" class="youtube">
|
|
179
179
|
<img src="{% static 'portal/img/thumbnail_python_den.png' %}"
|
|
180
180
|
alt="Python Den logo">
|
|
181
181
|
</a>
|
portal/urls.py
CHANGED
|
@@ -21,12 +21,9 @@ from portal.helpers.ratelimit import (
|
|
|
21
21
|
school_student_key,
|
|
22
22
|
)
|
|
23
23
|
from portal.helpers.regexes import ACCESS_CODE_REGEX, JWT_REGEX
|
|
24
|
-
from portal.views import cron
|
|
24
|
+
from portal.views import cron, google_analytics
|
|
25
25
|
from portal.views.about import about, contribute, getinvolved
|
|
26
|
-
from portal.views.admin import
|
|
27
|
-
AdminChangePasswordDoneView,
|
|
28
|
-
AdminChangePasswordView,
|
|
29
|
-
)
|
|
26
|
+
from portal.views.admin import AdminChangePasswordDoneView, AdminChangePasswordView
|
|
30
27
|
from portal.views.api import (
|
|
31
28
|
AnonymiseOrphanSchoolsView,
|
|
32
29
|
InactiveUsersView,
|
|
@@ -35,10 +32,7 @@ from portal.views.api import (
|
|
|
35
32
|
number_users_per_country,
|
|
36
33
|
registered_users,
|
|
37
34
|
)
|
|
38
|
-
from portal.views.dotmailer import
|
|
39
|
-
dotmailer_consent_form,
|
|
40
|
-
process_newsletter_form,
|
|
41
|
-
)
|
|
35
|
+
from portal.views.dotmailer import dotmailer_consent_form, process_newsletter_form
|
|
42
36
|
from portal.views.email import verify_email
|
|
43
37
|
from portal.views.home import (
|
|
44
38
|
coding_club,
|
|
@@ -111,12 +105,8 @@ from portal.views.two_factor.profile import CustomDisableView
|
|
|
111
105
|
js_info_dict = {"packages": ("conf.locale",)}
|
|
112
106
|
|
|
113
107
|
two_factor_patterns = [
|
|
114
|
-
re_path(
|
|
115
|
-
|
|
116
|
-
),
|
|
117
|
-
re_path(
|
|
118
|
-
r"^account/two_factor/qrcode/$", QRGeneratorView.as_view(), name="qr"
|
|
119
|
-
),
|
|
108
|
+
re_path(r"^account/two_factor/setup/$", CustomSetupView.as_view(), name="setup"),
|
|
109
|
+
re_path(r"^account/two_factor/qrcode/$", QRGeneratorView.as_view(), name="qr"),
|
|
120
110
|
re_path(
|
|
121
111
|
r"^account/two_factor/setup/complete/$",
|
|
122
112
|
SetupCompleteView.as_view(),
|
|
@@ -141,6 +131,11 @@ two_factor_patterns = [
|
|
|
141
131
|
|
|
142
132
|
|
|
143
133
|
urlpatterns = [
|
|
134
|
+
path(
|
|
135
|
+
"google-analytics/collect/",
|
|
136
|
+
google_analytics.collect,
|
|
137
|
+
name="collect-google-analytics",
|
|
138
|
+
),
|
|
144
139
|
path(
|
|
145
140
|
"cron/",
|
|
146
141
|
include(
|
|
@@ -187,9 +182,7 @@ urlpatterns = [
|
|
|
187
182
|
),
|
|
188
183
|
re_path(
|
|
189
184
|
r"^favicon\.ico$",
|
|
190
|
-
RedirectView.as_view(
|
|
191
|
-
url="/static/portal/img/favicon.ico", permanent=True
|
|
192
|
-
),
|
|
185
|
+
RedirectView.as_view(url="/static/portal/img/favicon.ico", permanent=True),
|
|
193
186
|
),
|
|
194
187
|
re_path(
|
|
195
188
|
r"^administration/password_change/$",
|
|
@@ -201,9 +194,7 @@ urlpatterns = [
|
|
|
201
194
|
AdminChangePasswordDoneView.as_view(),
|
|
202
195
|
name="administration_password_change_done",
|
|
203
196
|
),
|
|
204
|
-
re_path(
|
|
205
|
-
r"^users/inactive/", InactiveUsersView.as_view(), name="inactive_users"
|
|
206
|
-
),
|
|
197
|
+
re_path(r"^users/inactive/", InactiveUsersView.as_view(), name="inactive_users"),
|
|
207
198
|
re_path(
|
|
208
199
|
r"^locked_out/$",
|
|
209
200
|
TemplateView.as_view(template_name="portal/locked_out.html"),
|
|
@@ -281,9 +272,7 @@ urlpatterns = [
|
|
|
281
272
|
re_path(r"^consent_form/$", dotmailer_consent_form, name="consent_form"),
|
|
282
273
|
re_path(
|
|
283
274
|
r"^verify_email/$",
|
|
284
|
-
TemplateView.as_view(
|
|
285
|
-
template_name="portal/email_verification_needed.html"
|
|
286
|
-
),
|
|
275
|
+
TemplateView.as_view(template_name="portal/email_verification_needed.html"),
|
|
287
276
|
name="email_verification",
|
|
288
277
|
),
|
|
289
278
|
re_path(
|
|
@@ -368,9 +357,7 @@ urlpatterns = [
|
|
|
368
357
|
IndependentStudentDashboard.as_view(),
|
|
369
358
|
name="independent_student_details",
|
|
370
359
|
),
|
|
371
|
-
re_path(
|
|
372
|
-
r"^play/account/$", student_edit_account, name="student_edit_account"
|
|
373
|
-
),
|
|
360
|
+
re_path(r"^play/account/$", student_edit_account, name="student_edit_account"),
|
|
374
361
|
re_path(
|
|
375
362
|
r"^play/account/independent/$",
|
|
376
363
|
ratelimit(
|
|
@@ -398,9 +385,7 @@ urlpatterns = [
|
|
|
398
385
|
re_path(r"^contribute", contribute, name="contribute"),
|
|
399
386
|
re_path(r"^terms", terms, name="terms"),
|
|
400
387
|
re_path(r"^privacy-notice/$", privacy_notice, name="privacy_notice"),
|
|
401
|
-
re_path(
|
|
402
|
-
r"^privacy-policy/$", privacy_notice, name="privacy_policy"
|
|
403
|
-
), # Keeping this to route from old URL
|
|
388
|
+
re_path(r"^privacy-policy/$", privacy_notice, name="privacy_policy"), # Keeping this to route from old URL
|
|
404
389
|
re_path(r"^teach/dashboard/$", dashboard_manage, name="dashboard"),
|
|
405
390
|
re_path(
|
|
406
391
|
r"^teach/dashboard/kick/(?P<pk>[0-9]+)/$",
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import json
|
|
2
|
+
|
|
3
|
+
import requests
|
|
4
|
+
from django.http import HttpRequest, JsonResponse
|
|
5
|
+
from django.views.decorators.csrf import csrf_exempt
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@csrf_exempt
|
|
9
|
+
def collect(request: HttpRequest):
|
|
10
|
+
body: dict = json.loads(request.body)
|
|
11
|
+
measurement_id = body["measurement_id"]
|
|
12
|
+
api_secret = body["api_secret"]
|
|
13
|
+
debug = body.get("debug", False)
|
|
14
|
+
|
|
15
|
+
response = requests.post(
|
|
16
|
+
url=(
|
|
17
|
+
"https://www.google-analytics.com/debug/mp/collect"
|
|
18
|
+
if debug
|
|
19
|
+
else "https://www.google-analytics.com/mp/collect"
|
|
20
|
+
)
|
|
21
|
+
+ f"?measurement_id=${measurement_id}&api_secret=${api_secret}",
|
|
22
|
+
json=body["payload"],
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
return JsonResponse(
|
|
26
|
+
data=response.json() if debug else {},
|
|
27
|
+
status=response.status_code,
|
|
28
|
+
)
|
portal/views/legal.py
CHANGED
|
@@ -5,7 +5,7 @@ def privacy_notice(request):
|
|
|
5
5
|
return render(
|
|
6
6
|
request,
|
|
7
7
|
"portal/privacy_notice.html",
|
|
8
|
-
{"last_updated": "
|
|
8
|
+
{"last_updated": "28th February 2025", "last_updated_children": "28th February 2025"},
|
|
9
9
|
)
|
|
10
10
|
|
|
11
11
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|