Code

Opened 23 months ago

Closed 19 months ago

Last modified 19 months 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 19 months ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 22 months 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.

Version 0, edited 22 months ago by aaugustin (next)

Changed 19 months ago by timo

comment:2 Changed 19 months ago by timo

  • Has patch set

comment:3 Changed 19 months 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 19 months 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 19 months 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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.