Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
ca93f02c
Kaydet (Commit)
ca93f02c
authored
Nis 02, 2014
tarafından
Vishal Lal
Kaydeden (comit)
Tim Graham
Nis 02, 2014
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #22347 -- Unified FileSystemStorage documentation.
Thanks nliberg for the report.
üst
608e6eb2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
14 deletions
+12
-14
storage.txt
docs/ref/files/storage.txt
+10
-0
files.txt
docs/topics/files.txt
+2
-14
No files found.
docs/ref/files/storage.txt
Dosyayı görüntüle @
ca93f02c
...
...
@@ -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
...
...
docs/topics/files.txt
Dosyayı görüntüle @
ca93f02c
...
...
@@ -149,20 +149,8 @@ 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.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.
====================== ===================================================
Django ships with a :class:`django.core.files.storage.FileSystemStorage` class
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::
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment