Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fixed #22347 FileSystemStorage documentation unified #2506

Closed
wants to merge 1 commit into from

2 participants

@vlal

Moved parameter definitions from topics to reference docs. Added a link from topics to reference docs.

@timgraham
Owner

merged in ca93f02, thanks!

Be careful of trailing whitespace in your patch (I set my text editor to remove it on save) and also please wrap documentation at 80 characters. Also note our commit message guidelines and include dashes after "Fixed #XXXXX"

@timgraham timgraham closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 2, 2014
  1. @vlal
This page is out of date. Refresh to see the latest.
Showing with 12 additions and 13 deletions.
  1. +10 −0 docs/ref/files/storage.txt
  2. +2 −13 docs/topics/files.txt
View
10 docs/ref/files/storage.txt
@@ -36,6 +36,16 @@ The FileSystemStorage Class
:class:`~django.core.files.storage.Storage` and provides implementations
for all the public methods thereof.
+ .. attribute:: location
+
+ Absolute path to the directory that will hold the files.
+ Defaults to the value of your :setting:`MEDIA_ROOT` setting.
+
+ .. attribute:: base_url
+
+ URL that serves the files stored at this location.
+ Defaults to the value of your :setting:`MEDIA_URL` setting.
+
.. attribute:: file_permissions_mode
The file system permissions that the file will receive when it is
View
15 docs/topics/files.txt
@@ -149,20 +149,9 @@ See :doc:`/ref/files/storage` for the file storage API.
The built-in filesystem storage class
-------------------------------------
-Django ships with a built-in ``FileSystemStorage`` class (defined in
+Django ships with a built-in :class:`~django.core.files.storage.FileSystemStorage` class (defined in
``django.core.files.storage``) which implements basic local filesystem file
-storage. Its initializer takes two arguments:
-
-====================== ===================================================
-Argument Description
-====================== ===================================================
-``location`` Optional. Absolute path to the directory that will
- hold the files. If omitted, it will be set to the
- value of your :setting:`MEDIA_ROOT` setting.
-``base_url`` Optional. URL that serves the files stored at this
- location. If omitted, it will default to the value
- of your :setting:`MEDIA_URL` setting.
-====================== ===================================================
+storage.
For example, the following code will store uploaded files under
``/media/photos`` regardless of what your :setting:`MEDIA_ROOT` setting is::
Something went wrong with that request. Please try again.