mirror of
https://github.com/django/django.git
synced 2025-10-05 00:00:37 +00:00
Fixed #34110 -- Added in-memory file storage.
Thanks Paolo Melchiorre, Carlton Gibson, and Mariusz Felisiak for reviews.
This commit is contained in:
parent
04fdf71933
commit
72efd840a8
7 changed files with 638 additions and 2 deletions
|
@ -366,3 +366,12 @@ Preserving the test database
|
|||
The :option:`test --keepdb` option preserves the test database between test
|
||||
runs. It skips the create and destroy actions which can greatly decrease the
|
||||
time to run tests.
|
||||
|
||||
Avoiding disk access for media files
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. versionadded:: 4.2
|
||||
|
||||
The :class:`~django.core.files.storage.InMemoryStorage` is a convenient way to
|
||||
prevent disk access for media files. All data is kept in memory, then it gets
|
||||
discarded after tests run.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue