clinicedc 2.0.30__py3-none-any.whl → 2.0.31__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 clinicedc might be problematic. Click here for more details.
- {clinicedc-2.0.30.dist-info → clinicedc-2.0.31.dist-info}/METADATA +1 -1
- {clinicedc-2.0.30.dist-info → clinicedc-2.0.31.dist-info}/RECORD +7 -7
- edc_model_admin/dashboard/model_admin_dashboard_mixin.py +9 -5
- edc_model_admin/mixins/templates_model_admin_mixin.py +1 -1
- edc_sites/admin/site_model_admin_mixin.py +2 -2
- {clinicedc-2.0.30.dist-info → clinicedc-2.0.31.dist-info}/WHEEL +0 -0
- {clinicedc-2.0.30.dist-info → clinicedc-2.0.31.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: clinicedc
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.31
|
|
4
4
|
Summary: A clinical trials data management framework built on Django
|
|
5
5
|
Keywords: django,clinicedc,edc,clinical trials,research,data management,esource
|
|
6
6
|
Author: Erik van Widenfelt, Jonathan Willitts
|
|
@@ -1878,7 +1878,7 @@ edc_model_admin/changelist_buttons/model_admin_changelist_model_button_mixin.py,
|
|
|
1878
1878
|
edc_model_admin/context_processors.py,sha256=5Xx06ZOz47OythCBSQa7518kzkJ6Heb_IiOhPPYrkv0,842
|
|
1879
1879
|
edc_model_admin/dashboard/__init__.py,sha256=MJL3b7UQ86cPDhxH2A8cKj4rC3DkPDDWTunZcdXavRM,295
|
|
1880
1880
|
edc_model_admin/dashboard/model_admin_crf_dashboard_mixin.py,sha256=LcC6EFUmCg4J0ifggtZ7GvmrON_e1Sv_cOUJoaPwrH4,1339
|
|
1881
|
-
edc_model_admin/dashboard/model_admin_dashboard_mixin.py,sha256=
|
|
1881
|
+
edc_model_admin/dashboard/model_admin_dashboard_mixin.py,sha256=IWdCLQuqU3hRMBE4iIxUxdlLjm66sOwewC8S9fFpVZE,3737
|
|
1882
1882
|
edc_model_admin/dashboard/model_admin_stacked_inline_mixin.py,sha256=tBe2A8t_YfNtTasZvc3X8-PWPiTtcOMoBoxZHxa4gzc,807
|
|
1883
1883
|
edc_model_admin/dashboard/model_admin_subject_dashboard_mixin.py,sha256=WqCcc1QE7iAsF6WJSVQzoUw000JHjWt9Gz49cjosPbY,1996
|
|
1884
1884
|
edc_model_admin/history/__init__.py,sha256=mpNejmXJJgBAO8cNWezALB4ewLw2aJ3_I4ks-p6A2MM,59
|
|
@@ -1910,7 +1910,7 @@ edc_model_admin/mixins/model_admin_protect_pii_mixin.py,sha256=_Hm1VI3lfGPl7_fnr
|
|
|
1910
1910
|
edc_model_admin/mixins/model_admin_redirect_all_to_changelist_mixin.py,sha256=r6ukCJcJSMy365VjN32tdx5gZx7aqUqn8Xm7My0QuRY,2861
|
|
1911
1911
|
edc_model_admin/mixins/model_admin_redirect_on_delete_mixin.py,sha256=XcePzddy8zWwXUYr08eV7xuwfhmZtwhvMJrxlJcQMNA,3113
|
|
1912
1912
|
edc_model_admin/mixins/model_admin_replace_label_text_mixin.py,sha256=6gVwaVVgwPueaOO6rR0MuBe6WK7uWw5YosYOokSohRQ,694
|
|
1913
|
-
edc_model_admin/mixins/templates_model_admin_mixin.py,sha256=
|
|
1913
|
+
edc_model_admin/mixins/templates_model_admin_mixin.py,sha256=tVIhiLCp7IDiBPRn5w43XAiiCrpLBGrCJ3b_ryqPuOo,2619
|
|
1914
1914
|
edc_model_admin/static/edc_model_admin/admin/css/dark_mode.css,sha256=4e8Jqi5u2EZwQVNlj20OORrUVD0kaEx2ywQIxp-Bq5g,706
|
|
1915
1915
|
edc_model_admin/static/edc_model_admin/admin/css/edc_model_admin.css,sha256=t7sO2yR7RlNy-MbWcI98zF9IllzgNBAlov4NqefV2fQ,612
|
|
1916
1916
|
edc_model_admin/static/edc_model_admin/admin/css/themes/edc_deep_purple.css,sha256=8YogS9QYJqTLXf9kCsAZUYJElwZFVExzn3dsuLVGCZI,635
|
|
@@ -3013,7 +3013,7 @@ edc_sites/admin/__init__.py,sha256=WSOdF91qWcdhb4EUqmbKw7yaFMtljf5YWu-K8fdvBAs,2
|
|
|
3013
3013
|
edc_sites/admin/list_filters.py,sha256=P5HE6WYLXOQkgBwGMmsln6eCGu4pBDKCJ9jdcikmKKk,923
|
|
3014
3014
|
edc_sites/admin/site_admin.py,sha256=haNSrz3WiP_cMLv2SHRrKphVo316Z-RKJUORCPtBC5k,351
|
|
3015
3015
|
edc_sites/admin/site_fieldset_tuple.py,sha256=s_TbpCBrM2DBATFmKf6OwnDiDWvcTWc2gfl8EEUNpG8,224
|
|
3016
|
-
edc_sites/admin/site_model_admin_mixin.py,sha256=
|
|
3016
|
+
edc_sites/admin/site_model_admin_mixin.py,sha256=9U2Cqr6iL2JP9l-EBEBfpNESlMJoCeLm2b59jGylBw8,8931
|
|
3017
3017
|
edc_sites/admin_site.py,sha256=AINI5Kxx8_KimVIhpPWz_9PAvMcXGzkLWnEHKAFL-6E,163
|
|
3018
3018
|
edc_sites/apps.py,sha256=MbE5MfmP676ZfwUI9Jsuf6M-KiZSmYvMqJ3zhI8BN-o,2115
|
|
3019
3019
|
edc_sites/auths.py,sha256=oda_eUVL9cyfsVqUK7vpz3X5N4aGqAupVtV_nBY44-E,299
|
|
@@ -3407,7 +3407,7 @@ edc_vitals/models/fields/waist_circumference.py,sha256=fZcHFDdEwWLjIVLktKrFCD9UU
|
|
|
3407
3407
|
edc_vitals/models/fields/weight.py,sha256=zo9_9e3Cpu0UqoRbWS-iDkcDo6fK80b1dDQy4x4MyxE,921
|
|
3408
3408
|
edc_vitals/utils.py,sha256=vXid44KUXxeaSyund_y5MNXc5DFJs052_PwUAjszE2k,1384
|
|
3409
3409
|
edc_vitals/validators.py,sha256=vNiElWMs0rRnHRNuVoPLRf0rW_C_0xcfUyep1Y_Si5s,156
|
|
3410
|
-
clinicedc-2.0.
|
|
3411
|
-
clinicedc-2.0.
|
|
3412
|
-
clinicedc-2.0.
|
|
3413
|
-
clinicedc-2.0.
|
|
3410
|
+
clinicedc-2.0.31.dist-info/licenses/LICENSE,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
|
|
3411
|
+
clinicedc-2.0.31.dist-info/WHEEL,sha256=-neZj6nU9KAMg2CnCY6T3w8J53nx1kFGw_9HfoSzM60,79
|
|
3412
|
+
clinicedc-2.0.31.dist-info/METADATA,sha256=MaP_gtEy-Kg2ff5Wl38Vj4xQN7FzZfyC-0JU2ZQvA94,15786
|
|
3413
|
+
clinicedc-2.0.31.dist-info/RECORD,,
|
|
@@ -2,6 +2,7 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
from typing import TYPE_CHECKING
|
|
4
4
|
|
|
5
|
+
from django.contrib import admin
|
|
5
6
|
from django.core.exceptions import ObjectDoesNotExist
|
|
6
7
|
from django.template.loader import render_to_string
|
|
7
8
|
from django.urls import NoReverseMatch, reverse
|
|
@@ -21,6 +22,7 @@ class ModelAdminDashboardMixin:
|
|
|
21
22
|
show_dashboard_in_list_display_pos = None
|
|
22
23
|
view_on_site_label = _("Subject dashboard")
|
|
23
24
|
|
|
25
|
+
@admin.display(description=_("Dashboard"))
|
|
24
26
|
def dashboard(self, obj=None, label=None) -> str:
|
|
25
27
|
url = self.get_subject_dashboard_url(obj=obj)
|
|
26
28
|
if not url:
|
|
@@ -37,19 +39,19 @@ class ModelAdminDashboardMixin:
|
|
|
37
39
|
def get_subject_listboard_url_name(self) -> str:
|
|
38
40
|
return url_names.get(self.subject_listboard_url_name)
|
|
39
41
|
|
|
40
|
-
def get_subject_dashboard_url(self, obj=None) -> str | None:
|
|
42
|
+
def get_subject_dashboard_url(self, obj=None) -> str | None: # noqa: ARG002
|
|
41
43
|
return None
|
|
42
44
|
|
|
43
|
-
def get_subject_dashboard_url_name(self, obj=None) -> str:
|
|
45
|
+
def get_subject_dashboard_url_name(self, obj=None) -> str: # noqa: ARG002
|
|
44
46
|
return url_names.get(self.subject_dashboard_url_name)
|
|
45
47
|
|
|
46
48
|
def get_subject_dashboard_url_kwargs(self, obj) -> dict:
|
|
47
49
|
return dict(subject_identifier=obj.subject_identifier)
|
|
48
50
|
|
|
49
|
-
def get_post_url_on_delete_name(self, *args) -> str:
|
|
51
|
+
def get_post_url_on_delete_name(self, *args) -> str: # noqa: ARG002
|
|
50
52
|
return self.get_subject_dashboard_url_name()
|
|
51
53
|
|
|
52
|
-
def post_url_on_delete_kwargs(self, request, obj) -> dict:
|
|
54
|
+
def post_url_on_delete_kwargs(self, request, obj) -> dict: # noqa: ARG002
|
|
53
55
|
return self.get_subject_dashboard_url_kwargs(obj)
|
|
54
56
|
|
|
55
57
|
def get_registered_subject(self, obj) -> RegisteredSubject:
|
|
@@ -85,5 +87,7 @@ class ModelAdminDashboardMixin:
|
|
|
85
87
|
if callable(super().view_on_site):
|
|
86
88
|
url = super().view_on_site(obj)
|
|
87
89
|
else:
|
|
88
|
-
raise NoReverseMatch(
|
|
90
|
+
raise NoReverseMatch(
|
|
91
|
+
f"{e}. See subject_dashboard_url_name for {self!r}."
|
|
92
|
+
) from e
|
|
89
93
|
return url
|
|
@@ -59,7 +59,7 @@ class TemplatesModelAdminMixin:
|
|
|
59
59
|
)
|
|
60
60
|
|
|
61
61
|
def changelist_view(self, request, extra_context=None):
|
|
62
|
-
extra_context =
|
|
62
|
+
extra_context = extra_context if extra_context else {}
|
|
63
63
|
extra_context.update(
|
|
64
64
|
{
|
|
65
65
|
"show_object_tools": self.show_object_tools,
|
|
@@ -95,12 +95,12 @@ class SiteModelAdminMixin:
|
|
|
95
95
|
or self.has_viewallsites_permission(request)
|
|
96
96
|
) and "site" not in list_display:
|
|
97
97
|
list_display = tuple(list_display)
|
|
98
|
-
list_display = list_display[:pos], self.site_code, list_display[pos:]
|
|
98
|
+
list_display = *list_display[:pos], self.site_code, *list_display[pos:]
|
|
99
99
|
elif "site" in list_display:
|
|
100
100
|
list_display = tuple(
|
|
101
101
|
[x for x in list_display if x not in ["site", self.site_code]]
|
|
102
102
|
)
|
|
103
|
-
list_display = list_display[:pos], self.site_code, list_display[pos:]
|
|
103
|
+
list_display = *list_display[:pos], self.site_code, *list_display[pos:]
|
|
104
104
|
return list_display
|
|
105
105
|
|
|
106
106
|
def get_queryset(self, request) -> QuerySet:
|
|
File without changes
|
|
File without changes
|