Debian Codegraph @

doc/usage/advanced/websupport/storagebackends.rst

raw
1 .. _storagebackends:
2
3 .. currentmodule:: sphinxcontrib.websupport.storage
4
5 Storage backends
6 ================
7
8 To create a custom storage backend you will need to subclass the
9 :class:`StorageBackend` class. Then create an instance of the new class and
10 pass that as the *storage* keyword argument when you create the
11 :class:`~.WebSupport` object::
12
13 support = WebSupport(srcdir=srcdir,
14 builddir=builddir,
15 storage=MyStorage())
16
17 For more information about creating a custom storage backend, please see the
18 documentation of the :class:`StorageBackend` class below.
19
20 .. class:: StorageBackend
21
22 Defines an interface for storage backends.
23
24 .. versionchanged:: 1.6
25
26 StorageBackend class is moved to sphinxcontrib.websupport.storage from
27 sphinx.websupport.storage.
28
29
30 Methods
31 -------
32
33 .. automethod:: StorageBackend.pre_build
34
35 .. automethod:: StorageBackend.add_node
36
37 .. automethod:: StorageBackend.post_build
38
39 .. automethod:: StorageBackend.add_comment
40
41 .. automethod:: StorageBackend.delete_comment
42
43 .. automethod:: StorageBackend.get_data
44
45 .. automethod:: StorageBackend.process_vote
46
47 .. automethod:: StorageBackend.update_username
48
49 .. automethod:: StorageBackend.accept_comment