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

« 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.1.12 upstream) (29.1.1 maverick-security)
  • Revision ID: james.westby@ubuntu.com-20101012113435-yy57c8tx6g9anf3e
Tags: 1.2.3-1ubuntu0.1
* SECURITY UPDATE: XSS in CSRF protections. New upstream release
  - CVE-2010-3082
* debian/patches/01_disable_url_verify_regression_tests.diff:
  - updated to disable another test that fails without internet connection
  - patch based on work by Kai Kasurinen and Krzysztof Klimonda
* debian/control: don't Build-Depends on locales-all, which doesn't exist
  in maverick

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