#369 closed defect (wontfix)
put the D back in CRUD for FileField
Reported by: | jvoorhis | Owned by: | Adrian Holovaty |
---|---|---|---|
Component: | contrib.admin | Version: | |
Severity: | normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Allow FileFields to delete their files in the dynamic admin, as well as add and overwrite them. This would be extremely useful for nested admin setups where a file upload is optional - for example an editable tracklist with optional mp3 for an album view.
Change History (3)
comment:1 by , 19 years ago
comment:2 by , 19 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
We'd talked about this at some point in the past. The decision we came to was that since people might have linked directly to the media files, deleting the actual files would result in a 404, and "good links don't change." That is, this is a feature, not a bug (<grin>).
comment:3 by , 19 years ago
Note that calling obj.delete()
will delete any files from the filesystem if no other objects of the same type reference those files. See also #22.
Filefield is the only meta type that doesn't store its data in the DB (AFAIK). Since Django has a strict understand about where it stores the file in the filesystem, we think it should be possible for this data to be deleted when the record is deleted (without having to implement something like storing the reletive filepath in the DB and performing an os.rmdir on pre_delete).