Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#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: UI/UX:


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 Changed 11 years ago by Clint Ecker <clintecker@…>

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).

comment:2 Changed 11 years ago by Jacob

Resolution: wontfix
Status: newclosed

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 Changed 11 years ago by Adrian Holovaty

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.

Note: See TracTickets for help on using tickets.
Back to Top