imio.smartweb.common 1.2.20__py3-none-any.whl → 1.2.22__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.
@@ -51,12 +51,11 @@ class SmartwebCroppingImageScalingFactory(CroppingImageScalingFactory):
51
51
  ):
52
52
  storage = Storage(self.context)
53
53
  self.box = storage.read(fieldname, scale)
54
-
55
- if "portrait" in scale or "paysage" in scale or "carre" in scale:
56
- orientation = scale.split("_")[0]
57
- # take cropping box from "affiche" scale
58
- self.box = storage.read(fieldname, f"{orientation}_affiche")
59
-
54
+ if scale is not None:
55
+ if "portrait" in scale or "paysage" in scale or "carre" in scale:
56
+ orientation = scale.split("_")[0]
57
+ # take cropping box from "affiche" scale
58
+ self.box = storage.read(fieldname, f"{orientation}_affiche")
60
59
  if self.box:
61
60
  mode = "contain"
62
61
  else:
@@ -0,0 +1,20 @@
1
+ <configure
2
+ xmlns="http://namespaces.zope.org/zope"
3
+ xmlns:cache="http://namespaces.zope.org/cache"
4
+ xmlns:zcml="http://namespaces.zope.org/zcml">
5
+
6
+ <include package="z3c.unconfigure" file="meta.zcml" />
7
+
8
+ <unconfigure>
9
+ <cache:ruleset
10
+ for="plone.namedfile.scaling.ImageScale"
11
+ ruleset="plone.content.file"
12
+ />
13
+ </unconfigure>
14
+
15
+ <cache:ruleset
16
+ for="plone.namedfile.scaling.ImageScale"
17
+ ruleset="plone.stableResource"
18
+ />
19
+
20
+ </configure>
@@ -24,4 +24,6 @@
24
24
  <include package=".upgrades" />
25
25
  <include package=".viewlets" />
26
26
 
27
+ <includeOverrides file="caching_overrides.zcml" />
28
+
27
29
  </configure>
@@ -71,6 +71,9 @@ class TestCropping(unittest.TestCase):
71
71
  # uncropped scale
72
72
  self.assertIsNone(factory.box)
73
73
 
74
+ factory("image", "scale", 100, 100)
75
+ self.assertIsNone(factory.box)
76
+
74
77
  api.content.transition(self.folder, "publish")
75
78
  transaction.commit()
76
79
  browser = Browser(self.layer["app"])
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: imio.smartweb.common
3
- Version: 1.2.20
3
+ Version: 1.2.22
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
@@ -162,6 +162,20 @@ Changelog
162
162
  =========
163
163
 
164
164
 
165
+ 1.2.22 (2025-02-14)
166
+ -------------------
167
+
168
+ - WEB-4153 : Ruleset plone.stableResource for image scales
169
+ [remdub]
170
+
171
+
172
+ 1.2.21 (2025-01-31)
173
+ -------------------
174
+
175
+ - **Fix:** Updated to align scale behavior with the fix in plone.scale ([commit a352815](https://github.com/plone/plone.scale/commit/a352815#diff-24f46fc714c6d36041bcea7e64a7d5aeceacd929eb802655276a1d8f4b4576f4R209)).
176
+ [boulch]
177
+
178
+
165
179
  1.2.20 (2025-01-29)
166
180
  -------------------
167
181
 
@@ -1,10 +1,11 @@
1
- imio.smartweb.common-1.2.20-py3.12-nspkg.pth,sha256=XZ3YhlzwpUCC8tXtelHRqxVxo3NWomIiMsUfUshrbeE,1011
1
+ imio.smartweb.common-1.2.22-py3.12-nspkg.pth,sha256=XZ3YhlzwpUCC8tXtelHRqxVxo3NWomIiMsUfUshrbeE,1011
2
2
  imio/smartweb/common/__init__.py,sha256=Na9XBfEQUMrm2c5jbqQgwWeg40ih0aXVG1vT8NeAjMQ,2709
3
3
  imio/smartweb/common/adapters.py,sha256=rLlObjqZm3hs2hgUT-LmJytwhT-E1rTvbpIi0mmKQqY,610
4
4
  imio/smartweb/common/adapters.zcml,sha256=ndYNj0J_BFfVpX_7JhY2asSwLzXG-WmjLdfwL9hX_No,254
5
5
  imio/smartweb/common/caching.py,sha256=aN7gX9rT63fnmUuZnx82Mbu3ghjJUeOiLvLEp9OiFm4,895
6
+ imio/smartweb/common/caching_overrides.zcml,sha256=ysa5DgVGzO1Fp22d9Wg-vNyLlqfRR77WBV-7L6j0Hpo,526
6
7
  imio/smartweb/common/config.py,sha256=imgOo0_BBIbXGFNvBnhPReLOSY4JqIOH_QCAl0j0XGI,435
7
- imio/smartweb/common/configure.zcml,sha256=NiTXMd4tEs9R-DU9BavOaUTmGmndEzuSaSFt3d798jQ,840
8
+ imio/smartweb/common/configure.zcml,sha256=IQMv1giqgunu55osPlnVAq2MwM3FjJOGPgrxuO1e_74,894
8
9
  imio/smartweb/common/contact_utils.py,sha256=Pr-Nhz9MRnfirZ7RbmF5JZw9fX4gWa0dWkvJlQBiDKY,11341
9
10
  imio/smartweb/common/indexers.py,sha256=TvvKglWI0JM5_jwetlpvqcjwkid_2PhaCZGKZV4sD34,1148
10
11
  imio/smartweb/common/indexers.zcml,sha256=End1fDod99sr0xw8PaakgeTAZYq-HLOGw3MNA8K_CTs,324
@@ -28,7 +29,7 @@ imio/smartweb/common/behaviors/topics.py,sha256=K9XkhTBxxp_nBBeQ-ovUpmOc6raXIiYq
28
29
  imio/smartweb/common/browser/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
29
30
  imio/smartweb/common/browser/collective_taxonomy_controlpanel.py,sha256=QngrsXOIjOt0xHEt2r0W66CPg5msY4H7mDkRaAEGQdg,3044
30
31
  imio/smartweb/common/browser/configure.zcml,sha256=1cDR2cy7O6WX33cFmbJU971wxg22LkLJYiMKCmBTWrA,3177
31
- imio/smartweb/common/browser/cropping.py,sha256=uB0UiCUVMD1YT4a1rBmRzmhtnbatrPAXZztkSypiE6s,2676
32
+ imio/smartweb/common/browser/cropping.py,sha256=7xkTvs_0qUo9tC2tAIj77ZQn2RClKOgAwE0L6WhGGxg,2720
32
33
  imio/smartweb/common/browser/description.pt,sha256=ZXKpsMQDJGC0dxVUg5v1W6LsG1_OWuYuWevZuF-Zn2Y,151
33
34
  imio/smartweb/common/browser/description.py,sha256=BRpHkVzwyeM-SUzkEbtHn2fm8pQREtcHIW7feoQlBPQ,517
34
35
  imio/smartweb/common/browser/forms.py,sha256=UK72J9cEadVU4DqQ3OHqv2Jo_Qff9iFSoRv2gsWpZps,4168
@@ -80,7 +81,7 @@ imio/smartweb/common/sharing/localroles.py,sha256=CFy2WcQz5M4hk0Mj8_Lr1lazJ4vu6Z
80
81
  imio/smartweb/common/sharing/permissions.py,sha256=VKuVXrbfzzLJSX8q996GsVVdw59uxbeQ8Oe1U3jdOS4,452
81
82
  imio/smartweb/common/sharing/permissions.zcml,sha256=TL61HFqzovSVzLZfKEoOZgtLy3V5qdNEvjSk2nN-Xqw,224
82
83
  imio/smartweb/common/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
83
- imio/smartweb/common/tests/test_cropping.py,sha256=FErJqVF2pfpSU-0-orkQiNxk83KI8N_UFHOT2hYc--o,4736
84
+ imio/smartweb/common/tests/test_cropping.py,sha256=WGXTc21HQSE0tdr_W9WfrjisToMBRpm4Og3RvmE2YMM,4820
84
85
  imio/smartweb/common/tests/test_description.py,sha256=1gIMuNg5YQI52hqw2TiGeZyJFNo8PrvuepmmMB6N59U,2493
85
86
  imio/smartweb/common/tests/test_forms.py,sha256=dIhpFXRwojGarjU-s1nItjFVXUR86utU9Qg0xJX3Ll4,2413
86
87
  imio/smartweb/common/tests/test_indexes.py,sha256=3dzPAEbqnRqthKX9YUXM_dSbuZzWV-1Idf6GSWzCcfo,4960
@@ -135,10 +136,10 @@ imio/smartweb/common/viewlets/skip_to_content.pt,sha256=FFfTxvRl8V52FzFE6In6B34A
135
136
  imio/smartweb/common/viewlets/skip_to_content.py,sha256=wm22NUf8Qh5uzz8p4vkLCdFNiDv9zUGAueRyXAIXQDo,496
136
137
  imio/smartweb/common/widgets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
137
138
  imio/smartweb/common/widgets/select.py,sha256=vfVdbecH7qDfJvWV6TfkpqocD6AA5G4yIq7XqSOuVNw,1142
138
- imio.smartweb.common-1.2.20.dist-info/LICENSE.GPL,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
139
- imio.smartweb.common-1.2.20.dist-info/LICENSE.rst,sha256=5dd78Fdt0e-oM2ICBrMpjHnT8vEP-jhBDF7akXni6B4,655
140
- imio.smartweb.common-1.2.20.dist-info/METADATA,sha256=Q_m2tFHekzFxK84WQPMuMJpLryhVDtEbGFZWC51L1zs,15580
141
- imio.smartweb.common-1.2.20.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
142
- imio.smartweb.common-1.2.20.dist-info/namespace_packages.txt,sha256=Pg8AH8t9viMMW1hJbNZvTy_n2jXG2igIYUpon5RA4Js,19
143
- imio.smartweb.common-1.2.20.dist-info/top_level.txt,sha256=ZktC0EGzThvMTAin9_q_41rzvvfMT2FYbP8pbhSLMSA,5
144
- imio.smartweb.common-1.2.20.dist-info/RECORD,,
139
+ imio.smartweb.common-1.2.22.dist-info/LICENSE.GPL,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
140
+ imio.smartweb.common-1.2.22.dist-info/LICENSE.rst,sha256=5dd78Fdt0e-oM2ICBrMpjHnT8vEP-jhBDF7akXni6B4,655
141
+ imio.smartweb.common-1.2.22.dist-info/METADATA,sha256=6p2sF1KpKS-Nb6JwBOtSGwQ7I9CjC82Bjt8KExtxK4c,15965
142
+ imio.smartweb.common-1.2.22.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
143
+ imio.smartweb.common-1.2.22.dist-info/namespace_packages.txt,sha256=Pg8AH8t9viMMW1hJbNZvTy_n2jXG2igIYUpon5RA4Js,19
144
+ imio.smartweb.common-1.2.22.dist-info/top_level.txt,sha256=ZktC0EGzThvMTAin9_q_41rzvvfMT2FYbP8pbhSLMSA,5
145
+ imio.smartweb.common-1.2.22.dist-info/RECORD,,