imio.smartweb.common 1.2.27__py3-none-any.whl → 1.2.28__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.
- imio/smartweb/common/adapters.py +0 -1
- imio/smartweb/common/browser/collective_taxonomy_controlpanel.py +0 -3
- imio/smartweb/common/tests/test_widgets.py +96 -37
- {imio.smartweb.common-1.2.27.dist-info → imio_smartweb_common-1.2.28.dist-info}/METADATA +16 -2
- {imio.smartweb.common-1.2.27.dist-info → imio_smartweb_common-1.2.28.dist-info}/RECORD +11 -11
- {imio.smartweb.common-1.2.27.dist-info → imio_smartweb_common-1.2.28.dist-info}/WHEEL +1 -1
- /imio.smartweb.common-1.2.27-py3.12-nspkg.pth → /imio.smartweb.common-1.2.28-py3.13-nspkg.pth +0 -0
- {imio.smartweb.common-1.2.27.dist-info → imio_smartweb_common-1.2.28.dist-info/licenses}/LICENSE.GPL +0 -0
- {imio.smartweb.common-1.2.27.dist-info → imio_smartweb_common-1.2.28.dist-info/licenses}/LICENSE.rst +0 -0
- {imio.smartweb.common-1.2.27.dist-info → imio_smartweb_common-1.2.28.dist-info}/namespace_packages.txt +0 -0
- {imio.smartweb.common-1.2.27.dist-info → imio_smartweb_common-1.2.28.dist-info}/top_level.txt +0 -0
imio/smartweb/common/adapters.py
CHANGED
|
@@ -4,7 +4,6 @@ from imio.smartweb.common.utils import get_image_format
|
|
|
4
4
|
from plone.namedfile.interfaces import IAvailableSizes
|
|
5
5
|
from plone.namedfile.interfaces import INamedImageField
|
|
6
6
|
from plone.namedfile.field import InvalidImageFile
|
|
7
|
-
from plone.namedfile.utils import get_contenttype
|
|
8
7
|
from zope.component import adapter
|
|
9
8
|
from zope.component import getUtility
|
|
10
9
|
from zope.interface import Interface
|
|
@@ -2,11 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
from collective.taxonomy.interfaces import ITaxonomy
|
|
4
4
|
from collective.taxonomy.jsonimpl import EditTaxonomyData as baseEditTaxonomyData
|
|
5
|
-
from imio.smartweb.locales import SmartwebMessageFactory as _
|
|
6
5
|
from plone import api
|
|
7
6
|
from zope.component import queryUtility
|
|
8
|
-
from zope.component import queryUtility
|
|
9
|
-
from plone import api
|
|
10
7
|
from Products.Five import BrowserView
|
|
11
8
|
|
|
12
9
|
|
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
from imio.smartweb.common.testing import IMIO_SMARTWEB_COMMON_INTEGRATION_TESTING
|
|
4
4
|
from imio.smartweb.common.widgets.select import TranslatedAjaxSelectWidget
|
|
5
|
+
from importlib.metadata import version
|
|
5
6
|
from plone.api import portal as portal_api
|
|
6
7
|
from zope.publisher.browser import TestRequest
|
|
7
8
|
|
|
9
|
+
|
|
8
10
|
import mock
|
|
9
11
|
import unittest
|
|
10
12
|
|
|
@@ -20,42 +22,99 @@ class TestVocabulary(unittest.TestCase):
|
|
|
20
22
|
portal_api.get_current_language = mock.Mock(return_value="fr")
|
|
21
23
|
widget = TranslatedAjaxSelectWidget(self.request)
|
|
22
24
|
widget.update()
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
},
|
|
45
|
-
)
|
|
46
|
-
widget.value = "entertainment"
|
|
47
|
-
self.assertEqual(
|
|
48
|
-
widget._base_args(),
|
|
49
|
-
{
|
|
50
|
-
"name": None,
|
|
51
|
-
"value": "entertainment",
|
|
52
|
-
"pattern": "select2",
|
|
53
|
-
"pattern_options": {
|
|
54
|
-
"vocabularyUrl": "http://nohost/plone/@@getVocabulary?name=imio.smartweb.vocabulary.Topics",
|
|
55
|
-
"initialValues": {
|
|
56
|
-
"entertainment": "Activités et divertissement",
|
|
25
|
+
# __import__("pdb").set_trace()
|
|
26
|
+
if version("plone.app.z3cform") < "4.4.0":
|
|
27
|
+
self.assertEqual(
|
|
28
|
+
{
|
|
29
|
+
"name": None,
|
|
30
|
+
"value": "",
|
|
31
|
+
"pattern": "select2",
|
|
32
|
+
"pattern_options": {"separator": ";"},
|
|
33
|
+
},
|
|
34
|
+
widget._base_args(),
|
|
35
|
+
)
|
|
36
|
+
widget.vocabulary = "imio.smartweb.vocabulary.Topics"
|
|
37
|
+
self.assertEqual(
|
|
38
|
+
widget._base_args(),
|
|
39
|
+
{
|
|
40
|
+
"name": None,
|
|
41
|
+
"value": "",
|
|
42
|
+
"pattern": "select2",
|
|
43
|
+
"pattern_options": {
|
|
44
|
+
"vocabularyUrl": "http://nohost/plone/@@getVocabulary?name=imio.smartweb.vocabulary.Topics",
|
|
45
|
+
"separator": ";",
|
|
57
46
|
},
|
|
58
|
-
"separator": ";",
|
|
59
47
|
},
|
|
60
|
-
|
|
61
|
-
|
|
48
|
+
)
|
|
49
|
+
widget.value = "entertainment"
|
|
50
|
+
self.assertEqual(
|
|
51
|
+
widget._base_args(),
|
|
52
|
+
{
|
|
53
|
+
"name": None,
|
|
54
|
+
"value": "entertainment",
|
|
55
|
+
"pattern": "select2",
|
|
56
|
+
"pattern_options": {
|
|
57
|
+
"vocabularyUrl": "http://nohost/plone/@@getVocabulary?name=imio.smartweb.vocabulary.Topics",
|
|
58
|
+
"initialValues": {
|
|
59
|
+
"entertainment": "Activités et divertissement",
|
|
60
|
+
},
|
|
61
|
+
"separator": ";",
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
)
|
|
65
|
+
else:
|
|
66
|
+
# _base.args has been removed
|
|
67
|
+
# see https://github.com/plone/plone.app.z3cform/commit/5de30e9b117885859680dfe3861f134a667cea9c
|
|
68
|
+
self.assertEqual(
|
|
69
|
+
{
|
|
70
|
+
"name": None,
|
|
71
|
+
"value": None,
|
|
72
|
+
"pattern": "select2",
|
|
73
|
+
"pattern_options": {"separator": ";"},
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"name": widget.name,
|
|
77
|
+
"value": widget.value,
|
|
78
|
+
"pattern": widget.pattern,
|
|
79
|
+
"pattern_options": widget.get_pattern_options(),
|
|
80
|
+
},
|
|
81
|
+
)
|
|
82
|
+
widget.vocabulary = "imio.smartweb.vocabulary.Topics"
|
|
83
|
+
self.assertEqual(
|
|
84
|
+
{
|
|
85
|
+
"name": None,
|
|
86
|
+
"value": None,
|
|
87
|
+
"pattern": "select2",
|
|
88
|
+
"pattern_options": {
|
|
89
|
+
"vocabularyUrl": "http://nohost/plone/@@getVocabulary?name=imio.smartweb.vocabulary.Topics",
|
|
90
|
+
"separator": ";",
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"name": widget.name,
|
|
95
|
+
"value": widget.value,
|
|
96
|
+
"pattern": widget.pattern,
|
|
97
|
+
"pattern_options": widget.get_pattern_options(),
|
|
98
|
+
},
|
|
99
|
+
)
|
|
100
|
+
widget.value = "entertainment"
|
|
101
|
+
self.assertEqual(
|
|
102
|
+
{
|
|
103
|
+
"name": None,
|
|
104
|
+
"value": "entertainment",
|
|
105
|
+
"pattern": "select2",
|
|
106
|
+
"pattern_options": {
|
|
107
|
+
"vocabularyUrl": "http://nohost/plone/@@getVocabulary?name=imio.smartweb.vocabulary.Topics",
|
|
108
|
+
"initialValues": {
|
|
109
|
+
"entertainment": "Activités et divertissement",
|
|
110
|
+
},
|
|
111
|
+
"separator": ";",
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"name": widget.name,
|
|
116
|
+
"value": widget.value,
|
|
117
|
+
"pattern": widget.pattern,
|
|
118
|
+
"pattern_options": widget.get_pattern_options(),
|
|
119
|
+
},
|
|
120
|
+
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: imio.smartweb.common
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.28
|
|
4
4
|
Summary: Common utilities, vocabularies, taxonomies for imio.smartweb & co products
|
|
5
5
|
Home-page: https://github.com/imio/imio.smartweb.common
|
|
6
6
|
Author: iMio
|
|
@@ -15,10 +15,13 @@ Classifier: Environment :: Web Environment
|
|
|
15
15
|
Classifier: Framework :: Plone
|
|
16
16
|
Classifier: Framework :: Plone :: Addon
|
|
17
17
|
Classifier: Framework :: Plone :: 6.0
|
|
18
|
+
Classifier: Framework :: Plone :: 6.1
|
|
18
19
|
Classifier: Programming Language :: Python
|
|
19
20
|
Classifier: Programming Language :: Python :: 3
|
|
20
21
|
Classifier: Programming Language :: Python :: 3.10
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
23
|
Classifier: Programming Language :: Python :: 3.12
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
25
|
Classifier: Operating System :: OS Independent
|
|
23
26
|
Classifier: License :: OSI Approved :: GNU General Public License v2 (GPLv2)
|
|
24
27
|
Requires-Python: >=3.10
|
|
@@ -58,6 +61,7 @@ Dynamic: description
|
|
|
58
61
|
Dynamic: home-page
|
|
59
62
|
Dynamic: keywords
|
|
60
63
|
Dynamic: license
|
|
64
|
+
Dynamic: license-file
|
|
61
65
|
Dynamic: project-url
|
|
62
66
|
Dynamic: provides-extra
|
|
63
67
|
Dynamic: requires-dist
|
|
@@ -174,6 +178,16 @@ Changelog
|
|
|
174
178
|
=========
|
|
175
179
|
|
|
176
180
|
|
|
181
|
+
1.2.28 (2025-04-30)
|
|
182
|
+
-------------------
|
|
183
|
+
|
|
184
|
+
- Upgrade dev environment to Plone 6.1-latest
|
|
185
|
+
[remdub]
|
|
186
|
+
|
|
187
|
+
- Add tests for Plone 6.1-latest and add Python 3.13
|
|
188
|
+
[remdub]
|
|
189
|
+
|
|
190
|
+
|
|
177
191
|
1.2.27 (2025-03-19)
|
|
178
192
|
-------------------
|
|
179
193
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
imio.smartweb.common-1.2.
|
|
1
|
+
imio.smartweb.common-1.2.28-py3.13-nspkg.pth,sha256=XZ3YhlzwpUCC8tXtelHRqxVxo3NWomIiMsUfUshrbeE,1011
|
|
2
2
|
imio/smartweb/common/__init__.py,sha256=Na9XBfEQUMrm2c5jbqQgwWeg40ih0aXVG1vT8NeAjMQ,2709
|
|
3
|
-
imio/smartweb/common/adapters.py,sha256=
|
|
3
|
+
imio/smartweb/common/adapters.py,sha256=BjnzwhRhSYXziKUzmNTRBOXqDv4k8C8kfmwqZE7r1yU,1413
|
|
4
4
|
imio/smartweb/common/adapters.zcml,sha256=VO3luZDtRL9FIIEghxPrqpx8paZF3m6MGEy-8kF1sOQ,437
|
|
5
5
|
imio/smartweb/common/caching.py,sha256=aN7gX9rT63fnmUuZnx82Mbu3ghjJUeOiLvLEp9OiFm4,895
|
|
6
6
|
imio/smartweb/common/caching_overrides.zcml,sha256=ysa5DgVGzO1Fp22d9Wg-vNyLlqfRR77WBV-7L6j0Hpo,526
|
|
@@ -27,7 +27,7 @@ imio/smartweb/common/behaviors/configure.zcml,sha256=RfGH8DIybHpxxe2HUsjH2QKSiWY
|
|
|
27
27
|
imio/smartweb/common/behaviors/iam.py,sha256=17ON7M6FHXOM_8NOHT_QnJJuAIs4diWCrguHP6Lh5oA,825
|
|
28
28
|
imio/smartweb/common/behaviors/topics.py,sha256=K9XkhTBxxp_nBBeQ-ovUpmOc6raXIiYqmzJtlKVdhbI,863
|
|
29
29
|
imio/smartweb/common/browser/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
30
|
-
imio/smartweb/common/browser/collective_taxonomy_controlpanel.py,sha256=
|
|
30
|
+
imio/smartweb/common/browser/collective_taxonomy_controlpanel.py,sha256=vHSd1rSlfK1SI4o9BIYIWIsh6S9QuHgkSZokoKEDFGM,1784
|
|
31
31
|
imio/smartweb/common/browser/configure.zcml,sha256=agEY6fPCePV2UnzvVMUF-Wft0nU6HaHnMwv_lCk4_dQ,3534
|
|
32
32
|
imio/smartweb/common/browser/cropping.py,sha256=MjnXr-sfzjbJnscuX6rfyyEiwTmH9Pmu0sh_WirNnUk,2686
|
|
33
33
|
imio/smartweb/common/browser/description.pt,sha256=ZXKpsMQDJGC0dxVUg5v1W6LsG1_OWuYuWevZuF-Zn2Y,151
|
|
@@ -99,7 +99,7 @@ imio/smartweb/common/tests/test_utils.py,sha256=S4QrNVvkHv3Oxp45fWQ65dmGsk7POgUn
|
|
|
99
99
|
imio/smartweb/common/tests/test_viewlets.py,sha256=NVEZWEmYo4K_-81Q6w-JTx2nT_3NBcJCl3946MAUnhU,1738
|
|
100
100
|
imio/smartweb/common/tests/test_vocabularies.py,sha256=C-78USTvOHljuMSLkNb9onSRxLEJmBQLpktetAO74RE,848
|
|
101
101
|
imio/smartweb/common/tests/test_vocabulary.py,sha256=4E5i5znt_hLhnnRay1iBaOZRmQyFJs8-OMdPm4iSGSg,1638
|
|
102
|
-
imio/smartweb/common/tests/test_widgets.py,sha256=
|
|
102
|
+
imio/smartweb/common/tests/test_widgets.py,sha256=Yglnzt5kG7mBoaA2r-fr9vOTuXkM0w-KDTooXMCnqpA,4515
|
|
103
103
|
imio/smartweb/common/tests/resources/image.png,sha256=GBnPJt2ALEefn8GJAY1Lh8o9L6l6G77GJSyS0uveHvQ,1185
|
|
104
104
|
imio/smartweb/common/tests/resources/image_1400x800.png,sha256=Iy3bWGH4NBlgYC5BolZiNYFTKmCm0_I9MZDZo4sw_V4,30604
|
|
105
105
|
imio/smartweb/common/tests/resources/image_1800x700.png,sha256=aQcMisSFQO78c6QX4mO7qIfDb9SDRmfzTuPjxMJ_0HM,32643
|
|
@@ -137,10 +137,10 @@ imio/smartweb/common/viewlets/skip_to_content.pt,sha256=-tb3HkoGG8H_gBZL4eiJrPcW
|
|
|
137
137
|
imio/smartweb/common/viewlets/skip_to_content.py,sha256=wm22NUf8Qh5uzz8p4vkLCdFNiDv9zUGAueRyXAIXQDo,496
|
|
138
138
|
imio/smartweb/common/widgets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
139
139
|
imio/smartweb/common/widgets/select.py,sha256=vfVdbecH7qDfJvWV6TfkpqocD6AA5G4yIq7XqSOuVNw,1142
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
140
|
+
imio_smartweb_common-1.2.28.dist-info/licenses/LICENSE.GPL,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
|
|
141
|
+
imio_smartweb_common-1.2.28.dist-info/licenses/LICENSE.rst,sha256=5dd78Fdt0e-oM2ICBrMpjHnT8vEP-jhBDF7akXni6B4,655
|
|
142
|
+
imio_smartweb_common-1.2.28.dist-info/METADATA,sha256=9ZJX-fjl9O8XVGQrpj-BqWpBpWs8U50pMAVbVQQAilQ,17322
|
|
143
|
+
imio_smartweb_common-1.2.28.dist-info/WHEEL,sha256=ooBFpIzZCPdw3uqIQsOo4qqbA4ZRPxHnOH7peeONza0,91
|
|
144
|
+
imio_smartweb_common-1.2.28.dist-info/namespace_packages.txt,sha256=Pg8AH8t9viMMW1hJbNZvTy_n2jXG2igIYUpon5RA4Js,19
|
|
145
|
+
imio_smartweb_common-1.2.28.dist-info/top_level.txt,sha256=ZktC0EGzThvMTAin9_q_41rzvvfMT2FYbP8pbhSLMSA,5
|
|
146
|
+
imio_smartweb_common-1.2.28.dist-info/RECORD,,
|
/imio.smartweb.common-1.2.27-py3.12-nspkg.pth → /imio.smartweb.common-1.2.28-py3.13-nspkg.pth
RENAMED
|
File without changes
|
{imio.smartweb.common-1.2.27.dist-info → imio_smartweb_common-1.2.28.dist-info/licenses}/LICENSE.GPL
RENAMED
|
File without changes
|
{imio.smartweb.common-1.2.27.dist-info → imio_smartweb_common-1.2.28.dist-info/licenses}/LICENSE.rst
RENAMED
|
File without changes
|
|
File without changes
|
{imio.smartweb.common-1.2.27.dist-info → imio_smartweb_common-1.2.28.dist-info}/top_level.txt
RENAMED
|
File without changes
|