mirror of
https://github.com/django/django.git
synced 2025-03-31 19:46:42 +00:00
[4.2.x] Fixed #15799 -- Doc'd that Storage._open() should raise FileNotFoundError when file doesn't exist.
Backport of 8edaf07a28a3e3848ab1edbdcd2fdc25e6bd6015 from main
This commit is contained in:
parent
936afc2deb
commit
a22aeef555
@ -76,7 +76,8 @@ objects. These are:
|
|||||||
Called by ``Storage.open()``, this is the actual mechanism the storage class
|
Called by ``Storage.open()``, this is the actual mechanism the storage class
|
||||||
uses to open the file. This must return a ``File`` object, though in most cases,
|
uses to open the file. This must return a ``File`` object, though in most cases,
|
||||||
you'll want to return some subclass here that implements logic specific to the
|
you'll want to return some subclass here that implements logic specific to the
|
||||||
backend storage system.
|
backend storage system. The :exc:`FileNotFoundError` exception should be raised
|
||||||
|
when a file doesn't exist.
|
||||||
|
|
||||||
.. method:: _save(name, content)
|
.. method:: _save(name, content)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user