2010-07-16 13:31:16 -05:00
|
|
|
.. _storagebackends:
|
2010-07-15 13:25:12 -05:00
|
|
|
|
2017-04-22 04:52:02 -05:00
|
|
|
.. currentmodule:: sphinxcontrib.websupport.storage
|
2010-07-15 13:25:12 -05:00
|
|
|
|
2010-07-16 13:31:16 -05:00
|
|
|
Storage Backends
|
|
|
|
================
|
2010-07-15 13:25:12 -05:00
|
|
|
|
2010-08-09 14:22:31 -05:00
|
|
|
To create a custom storage backend you will need to subclass the
|
2010-08-21 12:15:14 -05:00
|
|
|
:class:`StorageBackend` class. Then create an instance of the new class and
|
|
|
|
pass that as the `storage` keyword argument when you create the
|
|
|
|
:class:`~.WebSupport` object::
|
2010-08-09 14:22:31 -05:00
|
|
|
|
2010-08-21 12:15:14 -05:00
|
|
|
support = WebSupport(srcdir=srcdir,
|
|
|
|
builddir=builddir,
|
|
|
|
storage=MyStorage())
|
2010-08-09 14:22:31 -05:00
|
|
|
|
2010-08-21 12:15:14 -05:00
|
|
|
For more information about creating a custom storage backend, please see the
|
|
|
|
documentation of the :class:`StorageBackend` class below.
|
2010-08-09 14:22:31 -05:00
|
|
|
|
|
|
|
.. class:: StorageBackend
|
|
|
|
|
2010-08-21 12:15:14 -05:00
|
|
|
Defines an interface for storage backends.
|
|
|
|
|
2017-04-22 04:52:02 -05:00
|
|
|
.. versionchanged:: 1.6
|
|
|
|
|
|
|
|
StorageBackend class is moved to sphinxcontrib.websupport.storage from
|
|
|
|
sphinx.websupport.storage.
|
|
|
|
|
2010-08-09 14:22:31 -05:00
|
|
|
|
2010-07-16 13:31:16 -05:00
|
|
|
StorageBackend Methods
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~
|
2010-07-15 13:25:12 -05:00
|
|
|
|
2010-08-21 12:15:14 -05:00
|
|
|
.. automethod:: StorageBackend.pre_build
|
2010-07-15 13:25:12 -05:00
|
|
|
|
2010-08-21 12:15:14 -05:00
|
|
|
.. automethod:: StorageBackend.add_node
|
2010-07-15 13:25:12 -05:00
|
|
|
|
2010-08-21 12:15:14 -05:00
|
|
|
.. automethod:: StorageBackend.post_build
|
2010-07-15 13:25:12 -05:00
|
|
|
|
2010-08-21 12:15:14 -05:00
|
|
|
.. automethod:: StorageBackend.add_comment
|
2010-07-15 13:25:12 -05:00
|
|
|
|
2010-08-21 12:15:14 -05:00
|
|
|
.. automethod:: StorageBackend.delete_comment
|
2010-08-09 14:22:31 -05:00
|
|
|
|
2010-08-21 12:15:14 -05:00
|
|
|
.. automethod:: StorageBackend.get_data
|
2010-08-09 14:22:31 -05:00
|
|
|
|
2010-08-21 12:15:14 -05:00
|
|
|
.. automethod:: StorageBackend.process_vote
|
2010-08-09 14:22:31 -05:00
|
|
|
|
2010-08-21 12:15:14 -05:00
|
|
|
.. automethod:: StorageBackend.update_username
|
2010-08-09 14:22:31 -05:00
|
|
|
|
2010-08-21 12:15:14 -05:00
|
|
|
.. automethod:: StorageBackend.accept_comment
|