#23376 closed Cleanup/optimization (fixed)
Inconsistent documentation about required Storage methods
Reported by: | Jaap Roes | Owned by: | James Brewer |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Normal | Keywords: | custom storage documentation, afraid-to-commit |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
https://docs.djangoproject.com/en/dev/howto/custom-file-storage/ mentions the following:
[...] but you must implement the following methods:
- Storage.delete()
- Storage.exists()
- Storage.listdir()
- Storage.size()
- Storage.url()
Yet https://docs.djangoproject.com/en/dev/ref/files/storage/#the-storage-class says that delete
, listdir
, size
and url
may raise NotImplementedError
. Which is it?
Change History (11)
comment:1 by , 10 years ago
Easy pickings: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
Type: | Bug → Cleanup/optimization |
comment:2 by , 10 years ago
Keywords: | afraid-to-commit added |
---|
I've marked this ticket as especially suitable for people following the Don't be afraid to commit tutorial at the DjangoCon US 2014 sprints. If you're tackling this ticket, please don't hesitate to ask me for guidance if you'd like any, either at the sprints themselves, or here or on the Django IRC channels, where I can be found as EvilDMP.
comment:3 by , 10 years ago
I would love to contribute to this as a beginner. I am not able to attend the sprints but I would love the feedback.
comment:4 by , 10 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:5 by , 10 years ago
Has patch: | set |
---|---|
Patch needs improvement: | set |
I think it would be good to add details about things that might break if you don't implement each method.
comment:6 by , 10 years ago
I've marked this ticket as especially suitable for people following the Don't be afraid to commit tutorial at the PyCon Ireland 2014 sprints. If you're tackling this ticket, please don't hesitate to ask me for guidance if you'd like any, either here or on the Django IRC channels, where I can be found as EvilDMP.
comment:7 by , 10 years ago
Owner: | changed from | to
---|
comment:8 by , 10 years ago
Patch needs improvement: | unset |
---|---|
Triage Stage: | Accepted → Ready for checkin |
Patch looks good to me.
comment:9 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Hi,
Indeed, this appears to be inconsistent.
A quick look at the history of the files seem to indicate that the "topic"-style documentation is older than the reference documentation so it might have gotten out of sync.
I'm not familiar with the storage API but it seems that
must
could be replaced byshould
here.Thanks.