oarepo-runtime 1.5.28__py3-none-any.whl → 1.5.29__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- oarepo_runtime/resources/localized_ui_json_serializer.py +10 -5
- {oarepo_runtime-1.5.28.dist-info → oarepo_runtime-1.5.29.dist-info}/METADATA +1 -1
- {oarepo_runtime-1.5.28.dist-info → oarepo_runtime-1.5.29.dist-info}/RECORD +7 -7
- {oarepo_runtime-1.5.28.dist-info → oarepo_runtime-1.5.29.dist-info}/LICENSE +0 -0
- {oarepo_runtime-1.5.28.dist-info → oarepo_runtime-1.5.29.dist-info}/WHEEL +0 -0
- {oarepo_runtime-1.5.28.dist-info → oarepo_runtime-1.5.29.dist-info}/entry_points.txt +0 -0
- {oarepo_runtime-1.5.28.dist-info → oarepo_runtime-1.5.29.dist-info}/top_level.txt +0 -0
@@ -27,13 +27,15 @@ class LocalizedUIJSONSerializer(MarshmallowSerializer):
|
|
27
27
|
self.object_schema_cls = object_schema_cls
|
28
28
|
self.list_schema_cls = list_schema_cls
|
29
29
|
|
30
|
-
def dump_obj(self, obj):
|
30
|
+
def dump_obj(self, obj, *args, **kwargs):
|
31
31
|
"""Dump the object using object schema class."""
|
32
|
-
|
33
|
-
|
34
|
-
|
32
|
+
ctx = {**self.schema_context, "locale": get_locale()}
|
33
|
+
if "extra_context" in kwargs:
|
34
|
+
ctx |= kwargs["extra_context"]
|
35
35
|
|
36
|
-
|
36
|
+
return self.object_schema_cls(context=ctx).dump(obj)
|
37
|
+
|
38
|
+
def dump_list(self, obj_list, *args, **kwargs):
|
37
39
|
"""Dump the list of objects."""
|
38
40
|
ctx = {
|
39
41
|
"object_schema_cls": self.object_schema_cls,
|
@@ -41,6 +43,9 @@ class LocalizedUIJSONSerializer(MarshmallowSerializer):
|
|
41
43
|
ctx.update(self.schema_context)
|
42
44
|
ctx["locale"] = get_locale()
|
43
45
|
|
46
|
+
if "extra_context" in kwargs:
|
47
|
+
ctx |= kwargs["extra_context"]
|
48
|
+
|
44
49
|
if self.list_schema_cls is None:
|
45
50
|
return self.object_schema_cls(context=self.schema_context).dump(
|
46
51
|
obj_list, many=True
|
@@ -66,7 +66,7 @@ oarepo_runtime/records/systemfields/selectors.py,sha256=VlbV3FKP2h3PLU7H4-YsI4qr
|
|
66
66
|
oarepo_runtime/records/systemfields/synthetic.py,sha256=zRsQdekcgsrD9R2UuI2kgVLjyQMIT8j3HAYav_e-xfM,4238
|
67
67
|
oarepo_runtime/resources/__init__.py,sha256=v8BGrOTu_FjKzd0eozV7Q4GoGxyfybsL2cI-tbP5Pys,185
|
68
68
|
oarepo_runtime/resources/file_resource.py,sha256=Ta3bFce7l0xwqkkOMOEu9mxbB8BbKj5HUHRHmidhnl8,414
|
69
|
-
oarepo_runtime/resources/localized_ui_json_serializer.py,sha256=
|
69
|
+
oarepo_runtime/resources/localized_ui_json_serializer.py,sha256=3V9cJaG_e1PMXKVX_wKfBp1LmbeForwHyBNYdyha4uQ,1878
|
70
70
|
oarepo_runtime/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
71
71
|
oarepo_runtime/services/components.py,sha256=9wt9CmoCFA8Utbb8eNA-Mvzo5LCApHT9zHpWIWZNyXY,1506
|
72
72
|
oarepo_runtime/services/generators.py,sha256=V582uA813AIXnFhzqUwakmDgBOI1SQe3XZeJtUXNbwM,872
|
@@ -114,9 +114,9 @@ oarepo_runtime/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hS
|
|
114
114
|
oarepo_runtime/utils/functools.py,sha256=gKS9YZtlIYcDvdNA9cmYO00yjiXBYV1jg8VpcRUyQyg,1324
|
115
115
|
oarepo_runtime/utils/path.py,sha256=V1NVyk3m12_YLbj7QHYvUpE1wScO78bYsX1LOLeXDkI,3108
|
116
116
|
tests/pkg_data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
117
|
-
oarepo_runtime-1.5.
|
118
|
-
oarepo_runtime-1.5.
|
119
|
-
oarepo_runtime-1.5.
|
120
|
-
oarepo_runtime-1.5.
|
121
|
-
oarepo_runtime-1.5.
|
122
|
-
oarepo_runtime-1.5.
|
117
|
+
oarepo_runtime-1.5.29.dist-info/LICENSE,sha256=h2uWz0OaB3EN-J1ImdGJZzc7yvfQjvHVYdUhQ-H7ypY,1064
|
118
|
+
oarepo_runtime-1.5.29.dist-info/METADATA,sha256=CGu5jtrm_4D0h-vZma0WRJdTcjL5k6jLqIR8O0aQJcs,4680
|
119
|
+
oarepo_runtime-1.5.29.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
120
|
+
oarepo_runtime-1.5.29.dist-info/entry_points.txt,sha256=QrlXAKuPDVBinaSh_v3yO9_Nb9ZNmJCJ0VFcCW-z0Jg,327
|
121
|
+
oarepo_runtime-1.5.29.dist-info/top_level.txt,sha256=bHhlkT1_RQC4IkfTQCqA3iN4KCB6cSFQlsXpQMSP-bE,21
|
122
|
+
oarepo_runtime-1.5.29.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|