diff --git a/docs/howto/custom-file-storage.txt b/docs/howto/custom-file-storage.txt
index 5f1dae1..54400e6 100644
a
|
b
|
Your custom storage system may override any of the storage methods explained in
|
46 | 46 | You'll also usually want to use hooks specifically designed for custom storage |
47 | 47 | objects. These are: |
48 | 48 | |
49 | | ``_open(name, mode='rb')`` |
50 | | ~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 49 | .. method:: _open(name, mode='rb') |
51 | 50 | |
52 | 51 | **Required**. |
53 | 52 | |
… |
… |
uses to open the file. This must return a ``File`` object, though in most cases,
|
56 | 55 | you'll want to return some subclass here that implements logic specific to the |
57 | 56 | backend storage system. |
58 | 57 | |
59 | | ``_save(name, content)`` |
60 | | ~~~~~~~~~~~~~~~~~~~~~~~~ |
| 58 | .. method:: _save(name, content) |
61 | 59 | |
62 | 60 | Called by ``Storage.save()``. The ``name`` will already have gone through |
63 | 61 | ``get_valid_name()`` and ``get_available_name()``, and the ``content`` will be a |
… |
… |
Should return the actual name of name of the file saved (usually the ``name``
|
67 | 65 | passed in, but if the storage needs to change the file name return the new name |
68 | 66 | instead). |
69 | 67 | |
70 | | ``get_valid_name(name)`` |
71 | | ~~~~~~~~~~~~~~~~~~~~~~~~ |
| 68 | .. method:: get_valid_name(name) |
| 69 | |
72 | 70 | |
73 | 71 | Returns a filename suitable for use with the underlying storage system. The |
74 | 72 | ``name`` argument passed to this method is the original filename sent to the |
… |
… |
how non-standard characters are converted to safe filenames.
|
78 | 76 | The code provided on ``Storage`` retains only alpha-numeric characters, periods |
79 | 77 | and underscores from the original filename, removing everything else. |
80 | 78 | |
81 | | ``get_available_name(name)`` |
82 | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 79 | .. method:: get_available_name(name) |
83 | 80 | |
84 | 81 | Returns a filename that is available in the storage mechanism, possibly taking |
85 | 82 | the provided filename into account. The ``name`` argument passed to this method |