Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#18413 closed Cleanup/optimization (fixed)

documentation on delete() should mention that associated file or image is not deleted

Reported by: lawgon Owned by: nobody
Component: Documentation Version: 1.4
Severity: Normal Keywords: delete FileField
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

When a model contains an image or file field, deleting an instance will not delete the file/image on disk. The user has to do this manually. The relevant section in the 1.3 release notes should be added to the documentation

Attachments (1)

18413.diff (789 bytes) - added by timo 3 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 3 years ago by aaugustin

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

Yes, this could go either in the documentation of Model.delete() or in the documentation of FileField.

The commit that introduced this behavior is [00e7a571c5].

Last edited 3 years ago by aaugustin (previous) (diff)

Changed 3 years ago by timo

comment:2 Changed 3 years ago by timo

  • Has patch set

comment:3 Changed 3 years ago by melinath

This seems to be pretty much copied from the 1.3 release notes - which is fine, but I don't think that you need to mention the FileField.delete() method specifically in this new context. It would probably be enough to just say something along the lines of: "Note that when a model is deleted, related files will remain on disk."

comment:4 Changed 3 years ago by Tim Graham <timograham@…>

  • Resolution set to fixed
  • Status changed from new to closed

In 1c03b23567a3098b9ab5df64b14e0dea8d1414ea:

Fixed #18413 - Noted that a model's files are not deleted when the model is deleted. Thanks lawgon for the report.

comment:5 Changed 3 years ago by Tim Graham <timograham@…>

In b1462e0a36bc6bb2c221bda107da74a6381b9675:

[1.4.X] Fixed #18413 - Noted that a model's files are not deleted when the model is deleted. Thanks lawgon for the report.

Backport of 1c03b23567 from master

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