plone.api/master: apply @hvelarde recommendations
Alexander Loechel <jenkins-z4DKO/[email protected]>
| Newsgroups | gmane.comp.web.zope.plone.cvs |
|---|---|
| Message-ID | <[email protected]> |
Repository: plone.api Branch: refs/heads/master Date: 2017-07-20T19:21:42+02:00 Author: Alexander Loechel (loechel) <[email protected]> Commit: https://github.com/plone/plone.api/commit/94e7c722207d267c3978dac718c1afc12abd659f apply @hvelarde recommendations Files changed: M docs/env.rst M src/plone/api/env.py diff --git a/docs/env.rst b/docs/env.rst index fb50b69..1b8f846 100644 --- a/docs/env.rst +++ b/docs/env.rst @@ -119,8 +119,8 @@ Therefore you could adjust the UI to prevent create, delete or update pages are from plone import api is_read_only = api.env.read_only_mode() - if is_read_only: - pass # do something + if is_read_only: + pass # do something .. _env_plone_version_example: diff --git a/src/plone/api/env.py b/src/plone/api/env.py index 32d81fb..8ac15ec 100644 --- a/src/plone/api/env.py +++ b/src/plone/api/env.py @@ -203,8 +203,9 @@ def test_mode(): def read_only_mode(): - """Returns True if you are running the zope instance on an read only ZODB. + """Check if the Zope instance is running on a read-only ZODB. + :returns: bool isReadOnly True if ZODB is read-only :Example: :ref:`env_read_only_mode_example` """ isReadOnly = True ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot