wbcore 1.59.5__py2.py3-none-any.whl → 1.59.6__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.
- wbcore/cache/registry.py +1 -1
- wbcore/configs/__init__.py +0 -1
- wbcore/configs/configs.py +0 -5
- wbcore/configurations/configurations/wbcore.py +0 -2
- wbcore/contrib/agenda/factories/calendar_item.py +1 -0
- wbcore/contrib/authentication/factories/users.py +1 -0
- wbcore/contrib/directory/factories/entries.py +1 -0
- wbcore/contrib/directory/migrations/0014_alter_entry_relationship_managers_and_more.py +28 -0
- wbcore/contrib/example_app/factories/person.py +1 -0
- wbcore/contrib/example_app/factories/team.py +1 -0
- wbcore/contrib/example_app/models.py +7 -6
- wbcore/contrib/example_app/tests/e2e/test_league.py +2 -2
- wbcore/contrib/example_app/tests/e2e/test_person.py +1 -1
- wbcore/contrib/example_app/tests/e2e/test_teams.py +1 -1
- wbcore/contrib/example_app/tests/test_filters.py +13 -13
- wbcore/contrib/example_app/tests/test_models/test_event.py +15 -13
- wbcore/contrib/example_app/tests/test_models/test_match.py +23 -23
- wbcore/contrib/example_app/tests/test_models/test_others.py +20 -18
- wbcore/contrib/example_app/tests/test_serializers/test_league_serializer.py +4 -4
- wbcore/contrib/example_app/tests/test_serializers/test_match_serializer.py +9 -4
- wbcore/contrib/example_app/tests/test_serializers/test_team_result_serializer.py +3 -3
- wbcore/contrib/example_app/tests/test_serializers/test_team_serializer.py +10 -10
- wbcore/contrib/example_app/tests/test_utils.py +8 -8
- wbcore/contrib/example_app/tests/test_viewsets/test_event_viewset.py +167 -162
- wbcore/contrib/example_app/tests/test_viewsets/test_league_viewset.py +9 -9
- wbcore/contrib/example_app/tests/test_viewsets/test_match_viewset.py +8 -8
- wbcore/contrib/example_app/tests/test_viewsets/test_person_viewset.py +16 -16
- wbcore/contrib/example_app/tests/test_viewsets/test_role_viewset.py +9 -9
- wbcore/contrib/example_app/tests/test_viewsets/test_sport_viewset.py +9 -9
- wbcore/contrib/example_app/tests/test_viewsets/test_stadium_viewset.py +9 -9
- wbcore/contrib/example_app/tests/test_viewsets/test_team_viewset.py +12 -12
- wbcore/contrib/example_app/tests/test_viewsets/test_teamresult_viewset.py +6 -6
- wbcore/contrib/geography/migrations/0002_geography_geography_geography_tree_i739a.py +17 -0
- wbcore/contrib/guardian/tests/test_utils.py +1 -1
- wbcore/contrib/guardian/utils.py +1 -1
- wbcore/contrib/icons/icons.py +2 -2
- wbcore/contrib/io/factories.py +2 -0
- wbcore/contrib/io/models.py +3 -3
- wbcore/contrib/io/viewsets.py +2 -2
- wbcore/contrib/tags/factories.py +1 -0
- wbcore/contrib/workflow/factories/step.py +1 -0
- wbcore/contrib/workflow/models/step.py +1 -1
- wbcore/docs/__init__.py +0 -2
- wbcore/filters/mixins.py +2 -2
- wbcore/markdown/views.py +0 -17
- wbcore/metadata/configs/buttons/__init__.py +1 -1
- wbcore/metadata/configs/buttons/bases.py +1 -6
- wbcore/metadata/configs/buttons/buttons.py +1 -7
- wbcore/metadata/configs/buttons/enums.py +0 -7
- wbcore/metadata/tests/test_buttons.py +1 -13
- wbcore/serializers/fields/fields.py +4 -2
- wbcore/serializers/fields/types.py +1 -0
- wbcore/test/tests.py +1 -1
- wbcore/tests/test_configs.py +0 -5
- wbcore/urls.py +0 -2
- wbcore/utils/figures.py +4 -8
- {wbcore-1.59.5.dist-info → wbcore-1.59.6.dist-info}/METADATA +26 -27
- {wbcore-1.59.5.dist-info → wbcore-1.59.6.dist-info}/RECORD +59 -57
- {wbcore-1.59.5.dist-info → wbcore-1.59.6.dist-info}/WHEEL +0 -0
|
@@ -11,7 +11,7 @@ from wbcore.serializers import ListSerializer, RepresentationSerializer, Seriali
|
|
|
11
11
|
from wbcore.utils.urls import get_parse_endpoint, get_urlencode_endpoint
|
|
12
12
|
|
|
13
13
|
from .bases import ButtonConfig, ButtonTypeMixin, ButtonUrlMixin
|
|
14
|
-
from .enums import ButtonType
|
|
14
|
+
from .enums import ButtonType
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
@dataclass
|
|
@@ -71,12 +71,6 @@ class WidgetButton(ButtonTypeMixin, ButtonUrlMixin, ButtonConfig):
|
|
|
71
71
|
@dataclass
|
|
72
72
|
class HyperlinkButton(ButtonTypeMixin, ButtonUrlMixin, ButtonConfig):
|
|
73
73
|
button_type = ButtonType.HYPERLINK
|
|
74
|
-
target: HyperlinkTarget = HyperlinkTarget.BLANK
|
|
75
|
-
|
|
76
|
-
def serialize(self, request, **kwargs):
|
|
77
|
-
res = super().serialize(request, **kwargs)
|
|
78
|
-
res["target"] = self.target.value
|
|
79
|
-
return res
|
|
80
74
|
|
|
81
75
|
def __hash__(self):
|
|
82
76
|
if self.key:
|
|
@@ -11,7 +11,7 @@ from wbcore.metadata.configs.buttons import (
|
|
|
11
11
|
HyperlinkButton,
|
|
12
12
|
WidgetButton,
|
|
13
13
|
)
|
|
14
|
-
from wbcore.metadata.configs.buttons.enums import ButtonDefaultColor
|
|
14
|
+
from wbcore.metadata.configs.buttons.enums import ButtonDefaultColor
|
|
15
15
|
from wbcore.metadata.configs.display.instance_display import create_simple_display
|
|
16
16
|
from wbcore.metadata.utils import prefix_key
|
|
17
17
|
|
|
@@ -31,7 +31,6 @@ class TestDropDownButton:
|
|
|
31
31
|
assert serialized_btn["icon"] == button.icon
|
|
32
32
|
assert serialized_btn["title"] == button.title
|
|
33
33
|
assert serialized_btn["color"] == button.color
|
|
34
|
-
assert serialized_btn["level"] == button.color
|
|
35
34
|
assert serialized_btn["buttons"] == [button.buttons[0].serialize(rf)]
|
|
36
35
|
assert serialized_btn["type"] == DropDownButton.button_type.value
|
|
37
36
|
|
|
@@ -43,7 +42,6 @@ class TestDropDownButton:
|
|
|
43
42
|
assert serialized_btn["icon"] == button.icon
|
|
44
43
|
assert serialized_btn["title"] == button.title
|
|
45
44
|
assert serialized_btn["color"] == button.color
|
|
46
|
-
assert serialized_btn["level"] == button.color
|
|
47
45
|
assert serialized_btn["buttons"] == [nested_button.serialize(rf, key_prefix=key_prefix)]
|
|
48
46
|
assert serialized_btn["type"] == DropDownButton.button_type.value
|
|
49
47
|
assert serialized_btn["buttons"][0]["key"] == prefix_key(nested_button.key, key_prefix)
|
|
@@ -78,7 +76,6 @@ class TestWidgetButton:
|
|
|
78
76
|
assert serialized_btn["icon"] == key_button.icon
|
|
79
77
|
assert serialized_btn["title"] == key_button.title
|
|
80
78
|
assert serialized_btn["color"] == key_button.color
|
|
81
|
-
assert serialized_btn["level"] == key_button.color
|
|
82
79
|
assert serialized_btn["key"] == key_button.key
|
|
83
80
|
assert serialized_btn["type"] == self.button_class.button_type.value
|
|
84
81
|
|
|
@@ -89,7 +86,6 @@ class TestWidgetButton:
|
|
|
89
86
|
assert serialized_btn["icon"] == key_button.icon
|
|
90
87
|
assert serialized_btn["title"] == key_button.title
|
|
91
88
|
assert serialized_btn["color"] == key_button.color
|
|
92
|
-
assert serialized_btn["level"] == key_button.color
|
|
93
89
|
assert serialized_btn["type"] == self.button_class.button_type.value
|
|
94
90
|
assert serialized_btn["key"] == prefix_key(key_button.key, key_prefix)
|
|
95
91
|
|
|
@@ -104,7 +100,6 @@ class TestWidgetButton:
|
|
|
104
100
|
assert serialized_btn["icon"] == endpoint_button.icon
|
|
105
101
|
assert serialized_btn["title"] == endpoint_button.title
|
|
106
102
|
assert serialized_btn["color"] == endpoint_button.color
|
|
107
|
-
assert serialized_btn["level"] == endpoint_button.color
|
|
108
103
|
assert serialized_btn["endpoint"] == endpoint_button.endpoint
|
|
109
104
|
assert serialized_btn["type"] == self.button_class.button_type.value
|
|
110
105
|
|
|
@@ -118,18 +113,11 @@ class TestWidgetButton:
|
|
|
118
113
|
class TestHyperlinkButtonutton(TestWidgetButton):
|
|
119
114
|
button_class = HyperlinkButton
|
|
120
115
|
|
|
121
|
-
def test_serialize(self, rf, key_button):
|
|
122
|
-
super().test_serialize(rf, key_button)
|
|
123
|
-
key_button.target = random.choice(list(HyperlinkTarget))
|
|
124
|
-
serialized_btn = key_button.serialize(rf)
|
|
125
|
-
assert serialized_btn["target"] == key_button.target.value
|
|
126
|
-
|
|
127
116
|
def test_serialize_endpoint_button(self, rf, endpoint_button):
|
|
128
117
|
serialized_btn = endpoint_button.serialize(rf)
|
|
129
118
|
assert serialized_btn["icon"] == endpoint_button.icon
|
|
130
119
|
assert serialized_btn["title"] == endpoint_button.title
|
|
131
120
|
assert serialized_btn["color"] == endpoint_button.color
|
|
132
|
-
assert serialized_btn["level"] == endpoint_button.color
|
|
133
121
|
assert serialized_btn["endpoint"] == endpoint_button.endpoint
|
|
134
122
|
assert serialized_btn["type"] == self.button_class.button_type.value
|
|
135
123
|
|
|
@@ -13,7 +13,7 @@ from wbcore.signals import (
|
|
|
13
13
|
from wbcore.utils.importlib import parse_signal_received_for_module
|
|
14
14
|
|
|
15
15
|
from .mixins import WBCoreSerializerFieldMixin
|
|
16
|
-
from .text import
|
|
16
|
+
from .text import StringRelatedField
|
|
17
17
|
from .types import WBCoreType
|
|
18
18
|
|
|
19
19
|
logger = logging.getLogger(__name__)
|
|
@@ -155,6 +155,8 @@ class AdditionalResourcesField(WBCoreSerializerFieldMixin, serializers.ReadOnlyF
|
|
|
155
155
|
|
|
156
156
|
|
|
157
157
|
class HyperlinkField(WBCoreSerializerFieldMixin, serializers.ReadOnlyField):
|
|
158
|
+
field_type = WBCoreType.HYPERLINK.value
|
|
159
|
+
|
|
158
160
|
def __init__(self, *args, **kwargs):
|
|
159
161
|
self.reverse_name = kwargs.pop("reverse_name")
|
|
160
162
|
self.id_field_name = kwargs.pop("id_field_name", "id")
|
|
@@ -178,7 +180,7 @@ class SlugRelatedField(WBCoreSerializerFieldMixin, serializers.SlugRelatedField)
|
|
|
178
180
|
|
|
179
181
|
|
|
180
182
|
class SerializerMethodField(WBCoreSerializerFieldMixin, serializers.SerializerMethodField):
|
|
181
|
-
def __init__(self, method_name=None, field_class=
|
|
183
|
+
def __init__(self, method_name=None, field_class=StringRelatedField, **kwargs):
|
|
182
184
|
self.field_class = field_class
|
|
183
185
|
self.initkwargs = kwargs
|
|
184
186
|
super().__init__(method_name, **kwargs)
|
wbcore/test/tests.py
CHANGED
wbcore/tests/test_configs.py
CHANGED
|
@@ -27,11 +27,6 @@ def test_share_config(config_registry: ConfigRegistry):
|
|
|
27
27
|
assert share
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
def test_markdown_config(config_registry: ConfigRegistry):
|
|
31
|
-
markdown = config_registry.get_config_dict()["markdown"]
|
|
32
|
-
assert markdown["blockdiag"]
|
|
33
|
-
|
|
34
|
-
|
|
35
30
|
def test_menu_calendar_config(config_registry: ConfigRegistry):
|
|
36
31
|
menu_calendar = config_registry.get_config_dict()["menu_calendar"]
|
|
37
32
|
assert menu_calendar
|
wbcore/urls.py
CHANGED
|
@@ -15,7 +15,6 @@ from .frontend_user_configuration import FrontendUserConfigurationModelViewSet
|
|
|
15
15
|
from .markdown.views import (
|
|
16
16
|
AssetCreateView,
|
|
17
17
|
AssetRetrieveView,
|
|
18
|
-
BlockDiag,
|
|
19
18
|
TemplateTagView,
|
|
20
19
|
)
|
|
21
20
|
from .menus.views import MenuAPIView
|
|
@@ -65,7 +64,6 @@ urlpatterns = [
|
|
|
65
64
|
path("menu/", MenuAPIView.as_view(), name="menu"),
|
|
66
65
|
path("preset/<str:display_identifier_path>/", PresetAPIView.as_view(), name="preset"),
|
|
67
66
|
path("share/", ShareAPIView.as_view(), name="share"),
|
|
68
|
-
path("markdown/blockdiag/", BlockDiag.as_view(), name="blockdiag"),
|
|
69
67
|
path("markdown/asset/", AssetCreateView.as_view(), name="markdown-asset-upload"),
|
|
70
68
|
path("markdown/asset/<uuid>/", AssetRetrieveView.as_view(), name="asset-retrieve"),
|
|
71
69
|
path("markdown/templatetag/", TemplateTagView.as_view(), name="markdown-tags"),
|
wbcore/utils/figures.py
CHANGED
|
@@ -83,8 +83,7 @@ def get_timeseries_chart(x_data, y_data, red, green, blue):
|
|
|
83
83
|
paper_bgcolor="rgba(0,0,0,0)",
|
|
84
84
|
plot_bgcolor="rgba(0,0,0,0)",
|
|
85
85
|
yaxis=dict(
|
|
86
|
-
title="",
|
|
87
|
-
titlefont=dict(color="#000000"),
|
|
86
|
+
title=dict(text="", font=dict(color="#000000")),
|
|
88
87
|
tickfont=dict(color="#000000"),
|
|
89
88
|
anchor="x",
|
|
90
89
|
side="right",
|
|
@@ -94,8 +93,7 @@ def get_timeseries_chart(x_data, y_data, red, green, blue):
|
|
|
94
93
|
),
|
|
95
94
|
yaxis_type="log",
|
|
96
95
|
xaxis=dict(
|
|
97
|
-
title="",
|
|
98
|
-
titlefont=dict(color="#000000"),
|
|
96
|
+
title=dict(text="", font=dict(color="#000000")),
|
|
99
97
|
tickfont=dict(color="#000000"),
|
|
100
98
|
showline=True,
|
|
101
99
|
linewidth=0.5,
|
|
@@ -158,13 +156,11 @@ def get_factsheet_timeseries_chart(df, color="rgb(120,214,255)", fillcolor="rgba
|
|
|
158
156
|
),
|
|
159
157
|
rangeslider=dict(visible=True),
|
|
160
158
|
type="date",
|
|
161
|
-
title="",
|
|
162
|
-
titlefont=dict(color="#000000"),
|
|
159
|
+
title=dict(text="", font=dict(color="#000000")),
|
|
163
160
|
tickfont=dict(color="#000000"),
|
|
164
161
|
),
|
|
165
162
|
yaxis=dict(
|
|
166
|
-
title="",
|
|
167
|
-
titlefont=dict(color="#000000"),
|
|
163
|
+
title=dict(text="", font=dict(color="#000000")),
|
|
168
164
|
tickfont=dict(color="#000000"),
|
|
169
165
|
anchor="x",
|
|
170
166
|
side="right",
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: wbcore
|
|
3
|
-
Version: 1.59.
|
|
3
|
+
Version: 1.59.6
|
|
4
4
|
Author-email: Christopher Wittlinger <c.wittlinger@stainly.com>
|
|
5
|
-
Requires-Dist: boto3==1.35.*
|
|
6
5
|
Requires-Dist: celery[redis]==5.*
|
|
7
6
|
Requires-Dist: croniter==2.*
|
|
8
7
|
Requires-Dist: django-admin-inline-paginator==0.4.0
|
|
9
|
-
Requires-Dist: django-anymail==
|
|
8
|
+
Requires-Dist: django-anymail==13.*
|
|
10
9
|
Requires-Dist: django-better-admin-arrayfield==1.4.*
|
|
11
10
|
Requires-Dist: django-celery-beat==2.*
|
|
12
|
-
Requires-Dist: django-colorfield==0.
|
|
11
|
+
Requires-Dist: django-colorfield==0.14.*
|
|
13
12
|
Requires-Dist: django-configurations[database]==2.5.*
|
|
14
|
-
Requires-Dist: django-cors-headers==4.
|
|
15
|
-
Requires-Dist: django-dynamic-preferences==1.
|
|
16
|
-
Requires-Dist: django-
|
|
17
|
-
Requires-Dist: django-
|
|
13
|
+
Requires-Dist: django-cors-headers==4.9.*
|
|
14
|
+
Requires-Dist: django-dynamic-preferences==1.17.*
|
|
15
|
+
Requires-Dist: django-eventtools==1.*
|
|
16
|
+
Requires-Dist: django-extensions==4.1.*
|
|
17
|
+
Requires-Dist: django-filter==25.*
|
|
18
18
|
Requires-Dist: django-fsm==2.*
|
|
19
|
-
Requires-Dist: django-guardian==2
|
|
19
|
+
Requires-Dist: django-guardian==3.2.*
|
|
20
20
|
Requires-Dist: django-import-export==4.*
|
|
21
|
-
Requires-Dist: django-maintenance-mode==0.
|
|
22
|
-
Requires-Dist: django-modeltrans>=0.
|
|
21
|
+
Requires-Dist: django-maintenance-mode==0.22.*
|
|
22
|
+
Requires-Dist: django-modeltrans>=0.9
|
|
23
23
|
Requires-Dist: django-mptt==0.*
|
|
24
24
|
Requires-Dist: django-ordered-model==3.7.*
|
|
25
25
|
Requires-Dist: django-picklefield==3.*
|
|
@@ -27,40 +27,39 @@ Requires-Dist: django-rest-fuzzysearch==0.5.*
|
|
|
27
27
|
Requires-Dist: django-reversion-compare==0.18.*
|
|
28
28
|
Requires-Dist: django-reversion==5.1.*
|
|
29
29
|
Requires-Dist: django-storages[boto3]==1.14.*
|
|
30
|
-
Requires-Dist: django==5.
|
|
31
|
-
Requires-Dist: djangorestframework-guardian==0.
|
|
30
|
+
Requires-Dist: django==5.2.*
|
|
31
|
+
Requires-Dist: djangorestframework-guardian==0.4.*
|
|
32
32
|
Requires-Dist: djangorestframework-simplejwt==5.*
|
|
33
33
|
Requires-Dist: djangorestframework==3.15.*
|
|
34
34
|
Requires-Dist: fabric==3.2.*
|
|
35
|
-
Requires-Dist: faker==
|
|
35
|
+
Requires-Dist: faker==38.*
|
|
36
36
|
Requires-Dist: firebase-admin==6.*
|
|
37
37
|
Requires-Dist: graphviz==0.*
|
|
38
38
|
Requires-Dist: humanize==4.*
|
|
39
39
|
Requires-Dist: ics==0.*
|
|
40
|
-
Requires-Dist: igraph==
|
|
40
|
+
Requires-Dist: igraph==1.*
|
|
41
41
|
Requires-Dist: inscriptis==1.*
|
|
42
|
-
Requires-Dist: langchain-openai
|
|
43
|
-
Requires-Dist: langchain
|
|
44
|
-
Requires-Dist: markdown
|
|
45
|
-
Requires-Dist: markdown>=3.8
|
|
42
|
+
Requires-Dist: langchain-openai==1.0.*
|
|
43
|
+
Requires-Dist: langchain==1.0.*
|
|
44
|
+
Requires-Dist: markdown==3.10.*
|
|
46
45
|
Requires-Dist: openpyxl==3.*
|
|
47
|
-
Requires-Dist: phonenumbers==
|
|
48
|
-
Requires-Dist:
|
|
49
|
-
Requires-Dist:
|
|
50
|
-
Requires-Dist: prettytable==0.*
|
|
46
|
+
Requires-Dist: phonenumbers==9.*
|
|
47
|
+
Requires-Dist: plotly==6.*
|
|
48
|
+
Requires-Dist: prettytable==3.*
|
|
51
49
|
Requires-Dist: psycopg[binary]==3.*
|
|
52
|
-
Requires-Dist: pycountry==
|
|
50
|
+
Requires-Dist: pycountry==24.*
|
|
53
51
|
Requires-Dist: pyjwt==2.*
|
|
54
52
|
Requires-Dist: pytest-sftpserver==1.*
|
|
55
53
|
Requires-Dist: python-magic==0.*
|
|
56
54
|
Requires-Dist: python-slugify==8.*
|
|
57
|
-
Requires-Dist: redis==
|
|
55
|
+
Requires-Dist: redis==7.*
|
|
56
|
+
Requires-Dist: reportlab==4.*
|
|
58
57
|
Requires-Dist: requests==2.*
|
|
59
58
|
Requires-Dist: rstr==3.2.*
|
|
60
|
-
Requires-Dist: schwifty==
|
|
59
|
+
Requires-Dist: schwifty==2025.*
|
|
61
60
|
Requires-Dist: tatsu==5.*
|
|
62
61
|
Requires-Dist: tqdm==4.*
|
|
63
|
-
Requires-Dist: weasyprint==
|
|
62
|
+
Requires-Dist: weasyprint==66.*
|
|
64
63
|
Provides-Extra: pandas
|
|
65
64
|
Requires-Dist: numpy==1.*; extra == 'pandas'
|
|
66
65
|
Requires-Dist: pandas==2.2.*; extra == 'pandas'
|