~ubuntu-branches/ubuntu/quantal/python-django/quantal-security

« back to all changes in this revision

Viewing changes to docs/howto/custom-file-storage.txt

  • Committer: Bazaar Package Importer
  • Author(s): Jamie Strandboge
  • Date: 2010-10-12 11:34:35 UTC
  • mfrom: (1.2.7 upstream)
  • mto: This revision was merged to the branch mainline in revision 30.
  • Revision ID: james.westby@ubuntu.com-20101012113435-9lnsrh0i3mxozbt0
Tags: upstream-1.2.3
ImportĀ upstreamĀ versionĀ 1.2.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.. _howto-custom-file-storage:
2
 
 
3
1
Writing a custom storage system
4
2
===============================
5
3
 
37
35
   the ``path()`` method.
38
36
 
39
37
Your custom storage system may override any of the storage methods explained in
40
 
:ref:`ref-files-storage`, but you **must** implement the following methods:
 
38
:doc:`/ref/files/storage`, but you **must** implement the following methods:
41
39
 
42
40
    * :meth:`Storage.delete`
43
41
    * :meth:`Storage.exists`
63
61
 
64
62
Called by ``Storage.save()``. The ``name`` will already have gone through
65
63
``get_valid_name()`` and ``get_available_name()``, and the ``content`` will be a
66
 
``File`` object itself. 
 
64
``File`` object itself.
67
65
 
68
66
Should return the actual name of name of the file saved (usually the ``name``
69
67
passed in, but if the storage needs to change the file name return the new name