summaryrefslogtreecommitdiff
path: root/docs/topics/files.txt
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2018-05-12 19:37:42 +0200
committerGitHub <noreply@github.com>2018-05-12 19:37:42 +0200
commit35319bf12ccefe1911588493484160aa49208f89 (patch)
treefe1cb029786e49622e6ba3af3ddf3dc9956502ff /docs/topics/files.txt
parent1b7d524cfa7b7834af26c99407af66be6813938d (diff)
downloaddjango-35319bf12ccefe1911588493484160aa49208f89.tar.gz
Alphabetized imports in various docs.
Follow-up of d97cce34096043b019e818a7fb98c0f9f073704c and 7d3fe36c626a3268413eb86d37920f132eb4a54f.
Diffstat (limited to 'docs/topics/files.txt')
-rw-r--r--docs/topics/files.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/topics/files.txt b/docs/topics/files.txt
index d9b2adbdf5..6a2ff44f0b 100644
--- a/docs/topics/files.txt
+++ b/docs/topics/files.txt
@@ -140,8 +140,8 @@ the proper storage for that file), you can use file storage systems directly.
You can create an instance of some custom file storage class, or -- often more
useful -- you can use the global default storage system::
- >>> from django.core.files.storage import default_storage
>>> from django.core.files.base import ContentFile
+ >>> from django.core.files.storage import default_storage
>>> path = default_storage.save('/path/to/file', ContentFile('new content'))
>>> path
@@ -169,8 +169,8 @@ which implements basic local filesystem file storage.
For example, the following code will store uploaded files under
``/media/photos`` regardless of what your :setting:`MEDIA_ROOT` setting is::
- from django.db import models
from django.core.files.storage import FileSystemStorage
+ from django.db import models
fs = FileSystemStorage(location='/media/photos')