From 783d2b56b38bf9054c85316421203337f1a97a2d Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Fri, 13 Jun 2014 19:35:24 +0200 Subject: [PATCH] Add some docs for read-only storage support --- docs/api.rst | 23 +++++++++++++++++++---- vdirsyncer/storage/http.py | 6 ------ 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/docs/api.rst b/docs/api.rst index 727e6bb..c3425d1 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -75,8 +75,9 @@ Storage Section - ``type`` defines which kind of storage is defined. See :ref:`storages`. - ``read_only`` defines whether the storage should be regarded as a read-only - storage, defaulting to ``False``. Setting this to ``True`` effectively means - synchronization will discard any changes made to the other side. + storage. The value ``True`` means synchronization will discard any changes + made to the other side. The value ``False`` implies normal 2-way + synchronization. - Any further parameters are passed on to the storage class. @@ -87,12 +88,26 @@ Supported Storages .. module:: vdirsyncer.storage +Read-write storages +------------------- + +These storages generally support reading and changing of their items. Their +default value for ``read_only`` is ``False``, but can be set to ``True`` if +wished. + .. autoclass:: CaldavStorage .. autoclass:: CarddavStorage .. autoclass:: FilesystemStorage -.. autoclass:: HttpStorage - .. autoclass:: SingleFileStorage + +Read-only storages +------------------ + +These storages don't support writing of their items, consequently ``read_only`` +is set to ``True`` by default. Changing ``read_only`` to ``False`` on them +might eventually lead to a crash of vdirsyncer when trying to write to them. + +.. autoclass:: HttpStorage diff --git a/vdirsyncer/storage/http.py b/vdirsyncer/storage/http.py index a3edb52..c40d4a4 100644 --- a/vdirsyncer/storage/http.py +++ b/vdirsyncer/storage/http.py @@ -49,12 +49,6 @@ class HttpStorage(Storage): Use a simple ``.ics`` file (or similar) from the web. Usable as ``http`` in the config file. - .. note:: - - This is a read-only storage. If you sync this with - read-and-write-storages (such as CalDAV), any changes on the other side - will get reverted. - :param url: URL to the ``.ics`` file. :param username: Username for authentication. :param password: Password for authentication.