Improve docs around deconstruction/serialisation (refs #22337)

This commit is contained in:
Andrew Godwin 2014-05-06 23:06:41 -07:00
parent f9d7e18dc5
commit 827d5dc189
3 changed files with 44 additions and 0 deletions

View file

@ -34,6 +34,13 @@ You'll need to follow these steps:
In addition, if your class provides local file storage, it must override
the ``path()`` method.
#. Your storage class must be :ref:`deconstructible <custom-deconstruct-method>`
so it can be serialized when it's used on a field in a migration. As long
as your field has arguments that are themselves
:ref:`serializable <migration-serializing>`, you can use the
``django.utils.deconstruct.deconstructible`` class decorator for this
(that's what Django uses on FileSystemStorage).
Your custom storage system may override any of the storage methods explained in
:doc:`/ref/files/storage`, but you **must** implement the following methods: