plone.tiles 3.0.0__py3-none-any.whl → 3.0.2__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.
- plone/tiles/data.py +4 -3
- plone/tiles/tile.py +5 -0
- plone/tiles/tiles.rst +9 -0
- {plone_tiles-3.0.0.dist-info → plone_tiles-3.0.2.dist-info}/METADATA +28 -1
- {plone_tiles-3.0.0.dist-info → plone_tiles-3.0.2.dist-info}/RECORD +11 -11
- /plone.tiles-3.0.0-py3.13-nspkg.pth → /plone.tiles-3.0.2-py3.13-nspkg.pth +0 -0
- {plone_tiles-3.0.0.dist-info → plone_tiles-3.0.2.dist-info}/LICENSE.GPL +0 -0
- {plone_tiles-3.0.0.dist-info → plone_tiles-3.0.2.dist-info}/LICENSE.txt +0 -0
- {plone_tiles-3.0.0.dist-info → plone_tiles-3.0.2.dist-info}/WHEEL +0 -0
- {plone_tiles-3.0.0.dist-info → plone_tiles-3.0.2.dist-info}/namespace_packages.txt +0 -0
- {plone_tiles-3.0.0.dist-info → plone_tiles-3.0.2.dist-info}/top_level.txt +0 -0
plone/tiles/data.py
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
from importlib.metadata import distribution
|
2
|
+
from importlib.metadata import PackageNotFoundError
|
1
3
|
from persistent.dict import PersistentDict
|
2
4
|
from plone.subrequest import ISubRequest
|
3
5
|
from plone.tiles.directives import IGNORE_QUERYSTRING_KEY
|
@@ -22,12 +24,11 @@ from zope.schema.interfaces import ISequence
|
|
22
24
|
|
23
25
|
import json
|
24
26
|
import logging
|
25
|
-
import pkg_resources
|
26
27
|
|
27
28
|
|
28
29
|
try:
|
29
|
-
|
30
|
-
except
|
30
|
+
distribution("plone.rfc822")
|
31
|
+
except PackageNotFoundError:
|
31
32
|
HAS_RFC822 = False
|
32
33
|
else:
|
33
34
|
from plone.rfc822.interfaces import IPrimaryField
|
plone/tiles/tile.py
CHANGED
@@ -103,6 +103,11 @@ class PersistentTile(Tile):
|
|
103
103
|
data dict is never serialized with the URL.
|
104
104
|
"""
|
105
105
|
|
106
|
+
def absolute_url(self):
|
107
|
+
# the "absolute_url" adapter for persistent tiles never has query parameters.
|
108
|
+
# We can safely return self.url here.
|
109
|
+
return self.url
|
110
|
+
|
106
111
|
|
107
112
|
class TileThemingTransform:
|
108
113
|
"""Disable plone.app.theming for tile responses"""
|
plone/tiles/tiles.rst
CHANGED
@@ -662,6 +662,7 @@ For convenience, the tile URL is also available under the ``url`` property:
|
|
662
662
|
>>> transientTile.url
|
663
663
|
'http://example.com/context/@@sample.tile/tile1?title=My+title&cssClass=foo&count%3Along=5'
|
664
664
|
|
665
|
+
|
665
666
|
The tile absolute URL structure remains unaltered if the data is
|
666
667
|
coming from a `_tiledata` JSON-encoded parameter instead of from the request
|
667
668
|
parameters directly:
|
@@ -699,6 +700,14 @@ And again, for convenience:
|
|
699
700
|
>>> persistentTile.url
|
700
701
|
'http://example.com/context/@@sample.persistenttile/tile2'
|
701
702
|
|
703
|
+
We also implement the ``absolute_url()`` method for persistent tiles.
|
704
|
+
This is needed for the latest ``plone.namedfile`` canonical header feature.
|
705
|
+
|
706
|
+
.. code-block:: python
|
707
|
+
|
708
|
+
>>> persistentTile.absolute_url()
|
709
|
+
'http://example.com/context/@@sample.persistenttile/tile2'
|
710
|
+
|
702
711
|
If the tile doesn't have an id, we don't get any sub-path:
|
703
712
|
|
704
713
|
.. code-block:: python
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: plone.tiles
|
3
|
-
Version: 3.0.
|
3
|
+
Version: 3.0.2
|
4
4
|
Summary: APIs for managing tiles
|
5
5
|
Home-page: https://github.com/plone/plone.tiles
|
6
6
|
Author: Martin Aspeli
|
@@ -979,6 +979,7 @@ For convenience, the tile URL is also available under the ``url`` property:
|
|
979
979
|
>>> transientTile.url
|
980
980
|
'http://example.com/context/@@sample.tile/tile1?title=My+title&cssClass=foo&count%3Along=5'
|
981
981
|
|
982
|
+
|
982
983
|
The tile absolute URL structure remains unaltered if the data is
|
983
984
|
coming from a `_tiledata` JSON-encoded parameter instead of from the request
|
984
985
|
parameters directly:
|
@@ -1016,6 +1017,14 @@ And again, for convenience:
|
|
1016
1017
|
>>> persistentTile.url
|
1017
1018
|
'http://example.com/context/@@sample.persistenttile/tile2'
|
1018
1019
|
|
1020
|
+
We also implement the ``absolute_url()`` method for persistent tiles.
|
1021
|
+
This is needed for the latest ``plone.namedfile`` canonical header feature.
|
1022
|
+
|
1023
|
+
.. code-block:: python
|
1024
|
+
|
1025
|
+
>>> persistentTile.absolute_url()
|
1026
|
+
'http://example.com/context/@@sample.persistenttile/tile2'
|
1027
|
+
|
1019
1028
|
If the tile doesn't have an id, we don't get any sub-path:
|
1020
1029
|
|
1021
1030
|
.. code-block:: python
|
@@ -1657,6 +1666,24 @@ Changelog
|
|
1657
1666
|
|
1658
1667
|
.. towncrier release notes start
|
1659
1668
|
|
1669
|
+
3.0.2 (2025-09-10)
|
1670
|
+
------------------
|
1671
|
+
|
1672
|
+
Bug fixes:
|
1673
|
+
|
1674
|
+
|
1675
|
+
- Drop ``pkg_resources`` usage. [maurits] (#4126)
|
1676
|
+
|
1677
|
+
|
1678
|
+
3.0.1 (2025-06-19)
|
1679
|
+
------------------
|
1680
|
+
|
1681
|
+
Bug fixes:
|
1682
|
+
|
1683
|
+
|
1684
|
+
- Implement `PersistentTile.absolute_url()` to fix canonical header introduced in `plone.namedfile`. @petschki
|
1685
|
+
|
1686
|
+
|
1660
1687
|
3.0.0 (2025-06-05)
|
1661
1688
|
------------------
|
1662
1689
|
|
@@ -1,8 +1,8 @@
|
|
1
|
-
plone.tiles-3.0.
|
1
|
+
plone.tiles-3.0.2-py3.13-nspkg.pth,sha256=BLI1R3lEMKmzB6WWJhK4b_5KSuPKCxbAXDyPjqDJtdY,462
|
2
2
|
plone/tiles/__init__.py,sha256=Z8dozv9RI5pWfpX8hHzYpY5VDe2ZrxcHm8UNiZzwzY4,151
|
3
3
|
plone/tiles/absoluteurl.py,sha256=bCeGy4By_965cCLpDVY9nk_al5u2Rdd6LHcH54HD6Rs,3278
|
4
4
|
plone/tiles/configure.zcml,sha256=MPp-H8tLqkSJPXGVPgMyCYERxqF5ozbIkIBXzz0UKLs,5104
|
5
|
-
plone/tiles/data.py,sha256=
|
5
|
+
plone/tiles/data.py,sha256=VBs_H9bDlBCtun-1EC0VP-s6KXmw2eqOu665mG8y57w,14069
|
6
6
|
plone/tiles/data.rst,sha256=CRST7U2AaUyXzBjbfoWYACUXtNLVcrhWKLL1SLhPrbw,7287
|
7
7
|
plone/tiles/directives.py,sha256=LPsC3zEGKdGOKpBacxzVapChLAKas81KRBzQbGg2q3w,304
|
8
8
|
plone/tiles/directives.rst,sha256=rUEh9I31ji8x6V19FTN85QxVvzHiHRCkS7IfqaE9Q1k,7101
|
@@ -14,16 +14,16 @@ plone/tiles/meta.py,sha256=SmKOvnx22nmZrboRwDHhP3A3jUGbv2gW6s_xvyoMVuM,4515
|
|
14
14
|
plone/tiles/meta.zcml,sha256=QQfHqe8s94GXi4XseoXx0cw0a9UsxcdL-xTdhEkNVF4,332
|
15
15
|
plone/tiles/test.pt,sha256=4eCZXAGM3lhrvVu9JOW-oIfHRuE1TejAo10HcXCJdDM,28
|
16
16
|
plone/tiles/testing.py,sha256=75_iPBOJ6IS9EwURKDYouw4ywo_JJe0RcUG0lk2EccM,1220
|
17
|
-
plone/tiles/tile.py,sha256=
|
18
|
-
plone/tiles/tiles.rst,sha256=
|
17
|
+
plone/tiles/tile.py,sha256=1TJto596yqMKyTReutpHaD35x2l6ankdijkSxDOR-G4,6613
|
18
|
+
plone/tiles/tiles.rst,sha256=Nl9TeFSnJhhnwx-TIviYk-yQZVbTu_kuWnXBIpCGz04,26681
|
19
19
|
plone/tiles/type.py,sha256=r4ws599FEtapQs94ZdY6bIBwjWYl-iPGsl8-je6LG_s,1015
|
20
20
|
plone/tiles/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
21
21
|
plone/tiles/tests/test_data.py,sha256=GWeqDsacjIJCnDVXercFk7h52c6htqvZ0s3vOVJ44ns,2397
|
22
22
|
plone/tiles/tests/test_doctests.py,sha256=QVxz1aX9fQtVHh-K3yzsc61HnD2VFUfIt0pJKQA8-Rk,835
|
23
|
-
plone_tiles-3.0.
|
24
|
-
plone_tiles-3.0.
|
25
|
-
plone_tiles-3.0.
|
26
|
-
plone_tiles-3.0.
|
27
|
-
plone_tiles-3.0.
|
28
|
-
plone_tiles-3.0.
|
29
|
-
plone_tiles-3.0.
|
23
|
+
plone_tiles-3.0.2.dist-info/LICENSE.GPL,sha256=qxX9UmvY3Rip5368E5ZWv00z6X_HI4zRG_YOK5uGZsY,17987
|
24
|
+
plone_tiles-3.0.2.dist-info/LICENSE.txt,sha256=HMcAY5SPUBS8rfCY_YRyqY3iHY6fd0d4jd69VNErzao,743
|
25
|
+
plone_tiles-3.0.2.dist-info/METADATA,sha256=ypnYAjHmFLcNt3bU2ALTbnC_84Z0BKmD2UZZl2aokW0,63048
|
26
|
+
plone_tiles-3.0.2.dist-info/WHEEL,sha256=beeZ86-EfXScwlR_HKu4SllMC9wUEj_8Z_4FJ3egI2w,91
|
27
|
+
plone_tiles-3.0.2.dist-info/namespace_packages.txt,sha256=56bqrkG-vurYD0l15D71FPiDL7L3QqkfRWkYkdyS7WM,6
|
28
|
+
plone_tiles-3.0.2.dist-info/top_level.txt,sha256=56bqrkG-vurYD0l15D71FPiDL7L3QqkfRWkYkdyS7WM,6
|
29
|
+
plone_tiles-3.0.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|