Opened 19 years ago

Closed 19 years ago

Last modified 19 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: 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 Clint Ecker <clintecker@…>, 19 years ago

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 by Jacob, 19 years ago

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 by Adrian Holovaty, 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.

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