plone.api 2.2.0__tar.gz → 2.2.1__tar.gz
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_api-2.2.0 → plone_api-2.2.1}/CHANGES.rst +10 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/PKG-INFO +11 -1
- {plone_api-2.2.0 → plone_api-2.2.1}/docs/about.md +1 -6
- {plone_api-2.2.0 → plone_api-2.2.1}/docs/user.md +2 -11
- {plone_api-2.2.0 → plone_api-2.2.1}/setup.py +1 -1
- {plone_api-2.2.0 → plone_api-2.2.1}/src/plone/api/tests/doctests/about.md +1 -6
- {plone_api-2.2.0 → plone_api-2.2.1}/src/plone/api/tests/doctests/user.md +2 -11
- {plone_api-2.2.0 → plone_api-2.2.1}/src/plone/api/tests/test_portal.py +16 -25
- {plone_api-2.2.0 → plone_api-2.2.1}/src/plone/api/tests/test_user.py +1 -7
- {plone_api-2.2.0 → plone_api-2.2.1}/src/plone.api.egg-info/PKG-INFO +11 -1
- {plone_api-2.2.0 → plone_api-2.2.1}/CONTRIBUTING.rst +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/LICENSE +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/MANIFEST.in +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/README.md +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/docs/content.md +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/docs/env.md +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/docs/group.md +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/docs/index.md +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/docs/portal.md +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/docs/relation.md +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/pyproject.toml +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/setup.cfg +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/src/plone/__init__.py +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/src/plone/api/__init__.py +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/src/plone/api/configure.zcml +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/src/plone/api/content.py +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/src/plone/api/env.py +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/src/plone/api/exc.py +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/src/plone/api/group.py +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/src/plone/api/portal.py +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/src/plone/api/profiles/testfixture/metadata.xml +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/src/plone/api/profiles/testfixture/types/Dexterity_Folder.xml +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/src/plone/api/profiles/testfixture/types/Dexterity_Item.xml +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/src/plone/api/profiles/testfixture/types.xml +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/src/plone/api/relation.py +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/src/plone/api/testing.zcml +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/src/plone/api/tests/Dexterity_Folder.xml +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/src/plone/api/tests/Dexterity_Item.xml +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/src/plone/api/tests/__init__.py +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/src/plone/api/tests/base.py +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/src/plone/api/tests/doctests/content.md +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/src/plone/api/tests/doctests/env.md +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/src/plone/api/tests/doctests/group.md +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/src/plone/api/tests/doctests/portal.md +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/src/plone/api/tests/doctests/relation.md +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/src/plone/api/tests/test_content.py +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/src/plone/api/tests/test_doctests.py +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/src/plone/api/tests/test_env.py +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/src/plone/api/tests/test_group.py +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/src/plone/api/tests/test_relation.py +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/src/plone/api/tests/test_validation.py +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/src/plone/api/user.py +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/src/plone/api/validation.py +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/src/plone.api.egg-info/SOURCES.txt +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/src/plone.api.egg-info/dependency_links.txt +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/src/plone.api.egg-info/namespace_packages.txt +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/src/plone.api.egg-info/not-zip-safe +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/src/plone.api.egg-info/requires.txt +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/src/plone.api.egg-info/top_level.txt +0 -0
- {plone_api-2.2.0 → plone_api-2.2.1}/tox.ini +0 -0
|
@@ -8,6 +8,16 @@ Changelog
|
|
|
8
8
|
|
|
9
9
|
.. towncrier release notes start
|
|
10
10
|
|
|
11
|
+
2.2.1 (2024-06-26)
|
|
12
|
+
------------------
|
|
13
|
+
|
|
14
|
+
Bug fixes:
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
- Removed `portal_properties` from documentation and tests.
|
|
18
|
+
[maurits] (#125)
|
|
19
|
+
|
|
20
|
+
|
|
11
21
|
2.2.0 (2024-05-06)
|
|
12
22
|
------------------
|
|
13
23
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: plone.api
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.1
|
|
4
4
|
Summary: A Plone API.
|
|
5
5
|
Home-page: https://github.com/plone/plone.api
|
|
6
6
|
Author: Plone Foundation
|
|
@@ -111,6 +111,16 @@ Changelog
|
|
|
111
111
|
|
|
112
112
|
.. towncrier release notes start
|
|
113
113
|
|
|
114
|
+
2.2.1 (2024-06-26)
|
|
115
|
+
------------------
|
|
116
|
+
|
|
117
|
+
Bug fixes:
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
- Removed `portal_properties` from documentation and tests.
|
|
121
|
+
[maurits] (#125)
|
|
122
|
+
|
|
123
|
+
|
|
114
124
|
2.2.0 (2024-05-06)
|
|
115
125
|
------------------
|
|
116
126
|
|
|
@@ -70,12 +70,7 @@ In general, importing and using an API looks something like this:
|
|
|
70
70
|
% invisible-code-block: python
|
|
71
71
|
%
|
|
72
72
|
% from plone import api
|
|
73
|
-
%
|
|
74
|
-
% try:
|
|
75
|
-
% api.portal.set_registry_record('plone.use_email_as_login', True)
|
|
76
|
-
% except InvalidParameterError:
|
|
77
|
-
% portal = api.portal.get()
|
|
78
|
-
% portal.portal_properties.site_properties.use_email_as_login = True
|
|
73
|
+
% api.portal.set_registry_record('plone.use_email_as_login', True)
|
|
79
74
|
|
|
80
75
|
```python
|
|
81
76
|
from plone import api
|
|
@@ -26,12 +26,7 @@ If your portal is configured to use emails as usernames, you just need to pass i
|
|
|
26
26
|
% invisible-code-block: python
|
|
27
27
|
%
|
|
28
28
|
% from plone import api
|
|
29
|
-
%
|
|
30
|
-
% try:
|
|
31
|
-
% api.portal.set_registry_record('plone.use_email_as_login', True)
|
|
32
|
-
% except InvalidParameterError:
|
|
33
|
-
% portal = api.portal.get()
|
|
34
|
-
% portal.portal_properties.site_properties.use_email_as_login = True
|
|
29
|
+
% api.portal.set_registry_record('plone.use_email_as_login', True)
|
|
35
30
|
|
|
36
31
|
```python
|
|
37
32
|
from plone import api
|
|
@@ -47,11 +42,7 @@ Otherwise, you also need to pass in the username of the new user.
|
|
|
47
42
|
|
|
48
43
|
% invisible-code-block: python
|
|
49
44
|
%
|
|
50
|
-
%
|
|
51
|
-
% api.portal.set_registry_record('plone.use_email_as_login', False)
|
|
52
|
-
% except InvalidParameterError:
|
|
53
|
-
% portal = api.portal.get()
|
|
54
|
-
% portal.portal_properties.site_properties.use_email_as_login = False
|
|
45
|
+
% api.portal.set_registry_record('plone.use_email_as_login', False)
|
|
55
46
|
|
|
56
47
|
```python
|
|
57
48
|
user = api.user.create(email='jane@plone.org', username='jane')
|
|
@@ -70,12 +70,7 @@ In general, importing and using an API looks something like this:
|
|
|
70
70
|
% invisible-code-block: python
|
|
71
71
|
%
|
|
72
72
|
% from plone import api
|
|
73
|
-
%
|
|
74
|
-
% try:
|
|
75
|
-
% api.portal.set_registry_record('plone.use_email_as_login', True)
|
|
76
|
-
% except InvalidParameterError:
|
|
77
|
-
% portal = api.portal.get()
|
|
78
|
-
% portal.portal_properties.site_properties.use_email_as_login = True
|
|
73
|
+
% api.portal.set_registry_record('plone.use_email_as_login', True)
|
|
79
74
|
|
|
80
75
|
```python
|
|
81
76
|
from plone import api
|
|
@@ -26,12 +26,7 @@ If your portal is configured to use emails as usernames, you just need to pass i
|
|
|
26
26
|
% invisible-code-block: python
|
|
27
27
|
%
|
|
28
28
|
% from plone import api
|
|
29
|
-
%
|
|
30
|
-
% try:
|
|
31
|
-
% api.portal.set_registry_record('plone.use_email_as_login', True)
|
|
32
|
-
% except InvalidParameterError:
|
|
33
|
-
% portal = api.portal.get()
|
|
34
|
-
% portal.portal_properties.site_properties.use_email_as_login = True
|
|
29
|
+
% api.portal.set_registry_record('plone.use_email_as_login', True)
|
|
35
30
|
|
|
36
31
|
```python
|
|
37
32
|
from plone import api
|
|
@@ -47,11 +42,7 @@ Otherwise, you also need to pass in the username of the new user.
|
|
|
47
42
|
|
|
48
43
|
% invisible-code-block: python
|
|
49
44
|
%
|
|
50
|
-
%
|
|
51
|
-
% api.portal.set_registry_record('plone.use_email_as_login', False)
|
|
52
|
-
% except InvalidParameterError:
|
|
53
|
-
% portal = api.portal.get()
|
|
54
|
-
% portal.portal_properties.site_properties.use_email_as_login = False
|
|
45
|
+
% api.portal.set_registry_record('plone.use_email_as_login', False)
|
|
55
46
|
|
|
56
47
|
```python
|
|
57
48
|
user = api.user.create(email='jane@plone.org', username='jane')
|
|
@@ -100,32 +100,23 @@ class TestPloneApiPortal(unittest.TestCase):
|
|
|
100
100
|
|
|
101
101
|
def _set_localization_date_format(self):
|
|
102
102
|
"""Set the expected localized date format."""
|
|
103
|
-
from plone.api.exc import InvalidParameterError
|
|
104
|
-
|
|
105
103
|
name_root = "Products.CMFPlone.i18nl10n.override_dateformat."
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
)
|
|
123
|
-
except InvalidParameterError:
|
|
124
|
-
# before Plone 4.3, date formats were stored in portal_properties
|
|
125
|
-
properties = portal.get_tool("portal_properties")
|
|
126
|
-
properties.localLongTimeFormat = "%b %d, %Y %I:%M %p"
|
|
127
|
-
properties.localTimeOnlyFormat = "%I:%M %p"
|
|
128
|
-
properties.localTimeFormat = "%b %d, %Y"
|
|
104
|
+
portal.set_registry_record(
|
|
105
|
+
name=name_root + "Enabled",
|
|
106
|
+
value=True,
|
|
107
|
+
)
|
|
108
|
+
portal.set_registry_record(
|
|
109
|
+
name=name_root + "date_format_long",
|
|
110
|
+
value="%b %d, %Y %I:%M %p",
|
|
111
|
+
)
|
|
112
|
+
portal.set_registry_record(
|
|
113
|
+
name=name_root + "time_format",
|
|
114
|
+
value="%I:%M %p",
|
|
115
|
+
)
|
|
116
|
+
portal.set_registry_record(
|
|
117
|
+
name=name_root + "date_format_short",
|
|
118
|
+
value="%b %d, %Y",
|
|
119
|
+
)
|
|
129
120
|
|
|
130
121
|
def test_get(self):
|
|
131
122
|
"""Test getting the portal object."""
|
|
@@ -42,13 +42,7 @@ class TestPloneApiUser(unittest.TestCase):
|
|
|
42
42
|
self.assertNotEqual(userid, username)
|
|
43
43
|
|
|
44
44
|
def _set_emaillogin(self, value):
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
try:
|
|
48
|
-
api.portal.set_registry_record("plone.use_email_as_login", value)
|
|
49
|
-
except InvalidParameterError:
|
|
50
|
-
portal = api.portal.get()
|
|
51
|
-
portal.portal_properties.site_properties.use_email_as_login = value
|
|
45
|
+
api.portal.set_registry_record("plone.use_email_as_login", value)
|
|
52
46
|
|
|
53
47
|
def test_create_no_email(self):
|
|
54
48
|
"""Test that exception is raised if no email is given."""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: plone.api
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.1
|
|
4
4
|
Summary: A Plone API.
|
|
5
5
|
Home-page: https://github.com/plone/plone.api
|
|
6
6
|
Author: Plone Foundation
|
|
@@ -111,6 +111,16 @@ Changelog
|
|
|
111
111
|
|
|
112
112
|
.. towncrier release notes start
|
|
113
113
|
|
|
114
|
+
2.2.1 (2024-06-26)
|
|
115
|
+
------------------
|
|
116
|
+
|
|
117
|
+
Bug fixes:
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
- Removed `portal_properties` from documentation and tests.
|
|
121
|
+
[maurits] (#125)
|
|
122
|
+
|
|
123
|
+
|
|
114
124
|
2.2.0 (2024-05-06)
|
|
115
125
|
------------------
|
|
116
126
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{plone_api-2.2.0 → plone_api-2.2.1}/src/plone/api/profiles/testfixture/types/Dexterity_Folder.xml
RENAMED
|
File without changes
|
{plone_api-2.2.0 → plone_api-2.2.1}/src/plone/api/profiles/testfixture/types/Dexterity_Item.xml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|