imio.smartweb.common 1.2.33__py3-none-any.whl → 1.2.35__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.
@@ -31,16 +31,20 @@ class ImageContenttypeValidator:
31
31
  self.value = value
32
32
 
33
33
  def __call__(self):
34
+ return self.validate_image()
35
+
36
+ def validate_image(self):
34
37
  if self.value is None:
35
- return
38
+ return False
36
39
  mimetype = get_image_format(self.value)
37
40
 
38
- valid_mimetypes = [
41
+ valid_mimetypes = {
39
42
  "image/gif",
40
43
  "image/jpeg",
41
44
  "image/png",
42
45
  "image/svg+xml",
43
46
  "image/webp",
44
- ]
47
+ }
45
48
  if mimetype not in valid_mimetypes:
46
49
  raise InvalidImageFile(mimetype, self.field.__name__)
50
+ return True
@@ -1 +1 @@
1
- form.tabbed-form-with-toggle fieldset legend.dropdown-toggle{cursor:pointer}form.tabbed-form-with-toggle fieldset:not(:first-child) legend.dropdown-toggle:after{display:inline-block;margin-left:7px;transform-origin:center center;transition:all .3s ease-in;vertical-align:middle}form.tabbed-form-with-toggle fieldset:not(:first-child) legend.dropdown-toggle.expanded:after{transform:rotate(180deg)}div.content-browser-wrapper button.upload{display:none}
1
+ form.tabbed-form-with-toggle fieldset legend.dropdown-toggle{cursor:pointer}form.tabbed-form-with-toggle fieldset:not(:first-child) legend.dropdown-toggle:after{display:inline-block;margin-left:7px;transform-origin:center center;transition:all .3s ease-in;vertical-align:middle}form.tabbed-form-with-toggle fieldset:not(:first-child) legend.dropdown-toggle.expanded:after{transform:rotate(180deg)}div.content-browser-wrapper button.upload{display:none}.linkModal .linkTypes a#tinymce-autotoc-autotoc-1{display:inline-block}
@@ -20,3 +20,9 @@ form.tabbed-form-with-toggle fieldset:not(:nth-child(1)) legend.dropdown-toggle{
20
20
  div.content-browser-wrapper button.upload {
21
21
  display: none;
22
22
  }
23
+
24
+ // Temporary fix, waiting to be included in imio_smartweb_themes
25
+ // See WEB-4258
26
+ .linkModal .linkTypes a#tinymce-autotoc-autotoc-1 {
27
+ display: inline-block;
28
+ }
@@ -223,6 +223,8 @@ def _get_pil_mimetype(pil_image):
223
223
 
224
224
  def get_image_format(named_blob_image):
225
225
  """Détecte le format d'une image à partir de son contenu binaire."""
226
+ if hasattr(named_blob_image, "contentType"):
227
+ return named_blob_image.contentType
226
228
  if named_blob_image and named_blob_image.data:
227
229
  try:
228
230
  with Image.open(BytesIO(named_blob_image.data)) as img:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: imio.smartweb.common
3
- Version: 1.2.33
3
+ Version: 1.2.35
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
@@ -178,6 +178,21 @@ Changelog
178
178
  =========
179
179
 
180
180
 
181
+ 1.2.35 (2025-05-26)
182
+ -------------------
183
+
184
+ - CITI-7 : Fix retrieving mimeType for some picture files
185
+ [boulch]
186
+
187
+
188
+ 1.2.34 (2025-05-26)
189
+ -------------------
190
+
191
+ - WEB-4258 : Temporary CSS fix to unhide the "External link" tab when adding a new link.
192
+ This a temporary fix while waiting for a new release in imio_smartweb_themes
193
+ [remdub]
194
+
195
+
181
196
  1.2.33 (2025-05-22)
182
197
  -------------------
183
198
 
@@ -1,6 +1,6 @@
1
- imio.smartweb.common-1.2.33-py3.12-nspkg.pth,sha256=XZ3YhlzwpUCC8tXtelHRqxVxo3NWomIiMsUfUshrbeE,1011
1
+ imio.smartweb.common-1.2.35-py3.12-nspkg.pth,sha256=XZ3YhlzwpUCC8tXtelHRqxVxo3NWomIiMsUfUshrbeE,1011
2
2
  imio/smartweb/common/__init__.py,sha256=Na9XBfEQUMrm2c5jbqQgwWeg40ih0aXVG1vT8NeAjMQ,2709
3
- imio/smartweb/common/adapters.py,sha256=BjnzwhRhSYXziKUzmNTRBOXqDv4k8C8kfmwqZE7r1yU,1413
3
+ imio/smartweb/common/adapters.py,sha256=dG4MALuHPQI6lTeNvs5p4vVOxHoBBYaWN6g8J96KxzQ,1507
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
@@ -20,7 +20,7 @@ imio/smartweb/common/subscribers.zcml,sha256=8v2lqNNVAHlrh2G3jtjVgr3Asrw8WJLS9jS
20
20
  imio/smartweb/common/testing.py,sha256=GKlYMHJUSxZFVX0o_R_c_Au1VYlkd-GjykQqfONHv7I,1985
21
21
  imio/smartweb/common/testing.zcml,sha256=7N-ALtklyWeLSzZmlxN2Tp-aZe_3An--w_6BGl1991E,172
22
22
  imio/smartweb/common/utility_overrides.zcml,sha256=Nn1q1FwQUyktB-EJM2qzPfsc-zUmHxX0Gj9OQTlYKQM,413
23
- imio/smartweb/common/utils.py,sha256=sSq72k41ELmlW5jc7JkRgKLXKQbbd68-87JtEDHmTCQ,7738
23
+ imio/smartweb/common/utils.py,sha256=bQaR1i9_dID2_QKmHImZfJhWOYzK8AzFtI43-IG7xPo,7831
24
24
  imio/smartweb/common/vocabularies.py,sha256=QRIOWLOALzZDM92o1iUTWgDBBcrdd9BYz7miNjpYCDA,3835
25
25
  imio/smartweb/common/vocabularies.zcml,sha256=iFJer5q3wabBp_EZivPPVUqI1_9w5P_Ft1RGJB5Yqxs,940
26
26
  imio/smartweb/common/widgets.zcml,sha256=GQ0aJblx44OJpj0HGXiyQJnFeSaJlOTMd1RAZn_1Qgk,375
@@ -46,13 +46,13 @@ imio/smartweb/common/browser/privacy/utils.py,sha256=sjjKUWb09Wgi6XeMj5d9qC93iCT
46
46
  imio/smartweb/common/browser/privacy/views.py,sha256=RITfvlYcWG43Zssy46q3Izt-fDYKrUrnhD1A_-zBYqQ,1815
47
47
  imio/smartweb/common/browser/static/Makefile,sha256=LtPs80oJtQ7OWohNU9C60gRVBfN3p0N8ki158FKU7pg,351
48
48
  imio/smartweb/common/browser/static/package.json,sha256=lGQOfiOS0-p0SBh2rnNkZKiZToIKNGviruLr3sFUfV8,755
49
- imio/smartweb/common/browser/static/smartweb-common-edit-compiled.css,sha256=4UcEN3qWH5OAfZB6MmAnLf28U1Da_APN2PBiV60-WZU,452
49
+ imio/smartweb/common/browser/static/smartweb-common-edit-compiled.css,sha256=XKYdL7pfkeY-RyoG-FdzhG3FYHM3upRimtebXlj_Pus,523
50
50
  imio/smartweb/common/browser/static/smartweb-common-edit-compiled.js,sha256=iHDTpF2oo2wJmkbP0mVRFxBZfpqPgVCp9POyBG5aOs0,804
51
51
  imio/smartweb/common/browser/static/smartweb-common-view-compiled.css,sha256=2ApU7ORyWPWUaylmnb-_JPVZyWNMGJsQFtaCcnuX-pY,1040
52
52
  imio/smartweb/common/browser/static/smartweb-common-view-compiled.js,sha256=7k8nElVDeNKuGC3G6wfN8KxMSlO-x1fEML7vs6l1LmA,1134
53
53
  imio/smartweb/common/browser/static/webpack.config.js,sha256=cb2bWO9Qd0IQX5kBsc8ynEbsDJCB5yPkagdAMEd6jvw,1045
54
54
  imio/smartweb/common/browser/static/src/edit.js,sha256=vmgtg9voaSw6nPcVNmkBqiuCnsrV-W352fSNZzxfDeU,1380
55
- imio/smartweb/common/browser/static/src/edit.less,sha256=1u66e_O063F048B4PEJWO3DCQs2wA0b6Ruf8rHCmcyc,466
55
+ imio/smartweb/common/browser/static/src/edit.less,sha256=CeD6s43Mm03iql_D6f9H_eJ3V0xFoy8_qx95yKnMgMw,627
56
56
  imio/smartweb/common/browser/static/src/view.js,sha256=CspnXPDZ8eo37Mse0Hk_NbVuXNRBrts3LOM4492z7-U,2045
57
57
  imio/smartweb/common/browser/static/src/view.less,sha256=6JV71CZtvZNaFhg6lIm2hwtfijxErsqb0ZyNPc3XIYs,1542
58
58
  imio/smartweb/common/faceted/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -146,10 +146,10 @@ imio/smartweb/common/viewlets/skip_to_content.py,sha256=wm22NUf8Qh5uzz8p4vkLCdFN
146
146
  imio/smartweb/common/widgets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
147
147
  imio/smartweb/common/widgets/select.py,sha256=5sV0UIgwu4AvwpgVmJeSZwUWz7OPD9VxYMowfmjcfbA,1313
148
148
  imio/smartweb/common/widgets/templates/ajaxselect_display.pt,sha256=v8TT2Xc19er6SUGWabgNfIdrayFYIjxyLK9H_XkIG3M,1209
149
- imio_smartweb_common-1.2.33.dist-info/licenses/LICENSE.GPL,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
150
- imio_smartweb_common-1.2.33.dist-info/licenses/LICENSE.rst,sha256=5dd78Fdt0e-oM2ICBrMpjHnT8vEP-jhBDF7akXni6B4,655
151
- imio_smartweb_common-1.2.33.dist-info/METADATA,sha256=5Do-lxg8Tx55jiys55rdTFw-mxmPz7Dg2gV176gimmE,18055
152
- imio_smartweb_common-1.2.33.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
153
- imio_smartweb_common-1.2.33.dist-info/namespace_packages.txt,sha256=Pg8AH8t9viMMW1hJbNZvTy_n2jXG2igIYUpon5RA4Js,19
154
- imio_smartweb_common-1.2.33.dist-info/top_level.txt,sha256=ZktC0EGzThvMTAin9_q_41rzvvfMT2FYbP8pbhSLMSA,5
155
- imio_smartweb_common-1.2.33.dist-info/RECORD,,
149
+ imio_smartweb_common-1.2.35.dist-info/licenses/LICENSE.GPL,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
150
+ imio_smartweb_common-1.2.35.dist-info/licenses/LICENSE.rst,sha256=5dd78Fdt0e-oM2ICBrMpjHnT8vEP-jhBDF7akXni6B4,655
151
+ imio_smartweb_common-1.2.35.dist-info/METADATA,sha256=HSWM1e8udHYqj3o5xNpsvFb3GLCKYYcHNmk6BJpnTzU,18389
152
+ imio_smartweb_common-1.2.35.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
153
+ imio_smartweb_common-1.2.35.dist-info/namespace_packages.txt,sha256=Pg8AH8t9viMMW1hJbNZvTy_n2jXG2igIYUpon5RA4Js,19
154
+ imio_smartweb_common-1.2.35.dist-info/top_level.txt,sha256=ZktC0EGzThvMTAin9_q_41rzvvfMT2FYbP8pbhSLMSA,5
155
+ imio_smartweb_common-1.2.35.dist-info/RECORD,,