Laurent Lasudry
7a2ed86ab4
Improve get_state to avoid errors
2019-10-25 10:06:11 +02:00
Nejc Zupan
71d99690bf
Merge pull request #153 from jcerjak/master
...
Use getPhysicalPath instead of absolute_url_path in api.content.get()
2014-01-27 15:05:42 -08:00
Matthew Sital-Singh
f8dac9c4c7
Catch AttributeError in ``api.content.get``
...
unrestrictedTraverse raises an AttributeError if the first part of the path can be traversed. If we are catching KeyError here we should do the same for AttributeError.
2013-12-20 17:16:12 +00:00
jcerjak
1070984775
use getPhysicalPath instead of absolute_url_path, refs #152
2013-12-16 19:01:12 +01:00
Matthew Sital-Singh
37fcb36b8c
Update exception syntax
2013-11-26 09:57:42 +00:00
Matthew Sital-Singh
465315a7f6
Prevent UnicodeDecodeErrors from being swallowed
...
UnicodeDecodeError is a subclass of ValueError, so these exceptions were being swallowed by the InvalidParameterError handling.
2013-11-25 16:34:59 +00:00
Rodrigo Ferreira de Souza
e083196049
Review copy/move/rename methods
2013-10-09 19:37:47 -03:00
Nejc Zupan
05765a5371
Merge pull request #134 from plone/issue_118
...
adding underlying error message
2013-10-05 09:59:24 -07:00
winstonf88
283529fcc8
adding underlying error message
2013-10-05 13:43:39 -03:00
Rodrigo Ferreira de Souza
6357f5406c
Fix api.content.copy without target parameter
2013-09-04 15:03:25 -03:00
Adam Cheasley
a0031a56e1
Do not assume we can acquire getLocallyAllowedTypes
...
It seems in some test scenarios getLocallyAllowedTypes is not always available. In this case, instead of raising an AttributeError, raise an InvalidParameterError with a helpful error string.
2013-05-31 12:08:13 +02:00
Kees Hink
5e22051c9f
Adapt imports to case-sensitive sort convention.
2013-05-27 17:19:00 +02:00
Nejc Zupan
2562b5f9c3
pyflakes
2013-04-03 19:45:16 +02:00
Nejc Zupan
131ff1bc07
Merge pull request #98 from pingviini/pingviini-independent-rename
...
Rename is now independent function used by copy and move functions when needed
2013-04-03 10:05:52 -07:00
Nejc Zupan
eb857e1e41
as of plone.testing 4.0.8, ACTUAL_URL is prepared for us, no need to manually set it any more, refs #92
2013-04-03 17:28:33 +02:00
Jukka Ojaniemi
bad881ad30
Rename is now independent function used by copy and move functions when
...
needed.
2013-03-12 21:39:13 +02:00
Jukka Ojaniemi
794901d145
Added fix for moving and copying error when source is folderish. Updated changelog.
2013-03-05 14:17:21 +02:00
Nejc Zupan
28e641c8db
minor spelling fix
2013-02-15 19:29:26 +01:00
Adam Cheasley
5a5e13bb63
correct this line so it conforms to the pep8 80 char limit
2013-02-05 08:25:13 +00:00
Adam Cheasley
16e82a0817
do reuse the argument variable name in this list comprehension
2013-02-04 17:38:20 +00:00
Nejc Zupan
3f5f563bc1
pep257
2013-01-26 21:52:47 +01:00
Jess Henderson
136f6b4b95
add at_least_one_of to content.py and update tests.
2013-01-26 18:22:38 +01:00
Nejc Zupan
c46a7aaa46
use new style string formatting
2013-01-26 16:40:30 +01:00
Jessica Henderson
be001dd9e8
apply @mutually_exclusive_parameters decorator to content.py and update tests
2013-01-26 14:47:59 +01:00
Jessica Henderson
ab32101941
Apply required_parameters to content.py
...
Alphabetise and remove unused imports in validation.py and test_validation.py
2013-01-26 14:43:12 +01:00
Nejc Zupan
9a37b8dd47
use plone.api methods in plone.api codebase
2013-01-25 20:59:00 +01:00
Nejc Zupan
bd423fe1ad
fixing code blocks indentation to match our code style
2013-01-25 20:08:58 +01:00
Nejc Zupan
baf669246a
sort import based on plone.api conventions
2013-01-25 19:42:05 +01:00
Cillian de Róiste
22a4f511c8
Style: reorganize imports
2013-01-25 14:29:51 +01:00
Nejc Zupan
6401356575
Merge branch 'flake8'
2013-01-25 13:55:44 +01:00
Cillian de Róiste
28e8789f4a
Style: Wrap long lines according to the style guide
2013-01-25 12:24:34 +01:00
Cillian de Róiste
092853b494
Remove unused variable
2013-01-25 01:27:26 +01:00
Cillian de Róiste
41d4df77f8
GH-71 get the portal path with absolute_url_path so that it content.get works with sites which don't have the portal in the zope root
...
I don't know a nice way to write a test for this since the test layer assumes that the portal is in the site root. I have tested it manually with a local instance.
2013-01-25 00:41:07 +01:00
Cillian de Róiste
19118430aa
Update import for INameChooser for Plone 4.3
...
Plone 4.3 removes many outdated packages and tidies up imports: http://plone.org/documentation/manual/upgrade-guide/version/upgrading-plone-4.2-to-4.3/updating-package-dependencies
This change will need to be revised if Plone 4.0 support is required for plone.api
2013-01-24 14:45:36 +01:00
Nejc Zupan
5fb7e92b28
More robust get_registry_record.
...
Previously if a record had a value of 'None', then get_registry_record would
fail with KeyError. This is now fixed.
I also added a more helpful error message that, in case you passed an
inexisting record name, prints a list of available records.
Lastly I threw some code around to make it prettier.
2012-12-20 16:26:59 +01:00
Nejc Zupan
32ef5d675a
make docstrigs abide the guidelines specified in PEP257
2012-10-21 12:19:49 +02:00
Nejc Zupan
5cd4d18c24
shebangs and module-level imports
2012-10-21 12:18:46 +02:00
Nejc Zupan
685201ee5c
reordering/restructuring imports to be according to the style guide
2012-10-21 12:18:45 +02:00
Nejc Zupan
c1c0c1e546
work on docs, rearranging, gardening, etc.
2012-10-14 19:53:59 +02:00
Nejc Zupan
798dd630e4
remove get_helpers() methods, refs #24
2012-10-13 13:14:03 +02:00
Johannes Raggam
f6dd38988b
sphinx autodoc docstring fix
2012-09-08 15:20:37 +02:00
Nejc Zupan
21e816278b
rename api.exceptions into api.exc
2012-09-03 19:44:51 +02:00
Nejc Zupan
cd88084a23
refactored flag in content manipulation to
2012-09-03 18:17:36 +02:00
Nejc Zupan
b37b275537
pyflakes & pep8
2012-09-03 13:04:34 +02:00
Nejc Zupan
4227f0c5be
user.get_helpers() stub
2012-09-03 12:59:53 +02:00
Nejc Zupan
fb6f0a57fb
uuid() -> get_uuid()
2012-09-03 12:59:38 +02:00
Nejc Zupan
bd1e7e7605
Merge pull request #42 from plone/issue_41
...
switching getSite calls to plone.api.portal.get, ref #41
2012-08-26 13:31:17 -07:00
Nejc Zupan
be079c932d
documentation of exceptions
2012-08-26 16:57:56 -03:00
Juan Pablo Giménez
a936666a13
switching getSite calls to plone.api.portal.get
2012-08-26 16:15:01 -03:00
Juan Pablo Giménez
83cd5a9864
implemented rename method as a wrapper arround move, ref #16
2012-08-26 15:49:36 -03:00