Opened 13 years ago
Closed 13 years ago
#16875 closed Uncategorized (needsinfo)
db.model.FileField's close method doesn't close
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Uncategorized | Version: | 1.3 |
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
This doesn't work:
model_object.file.close()
This works:
model_object.file.file.close()
Note:
See TracTickets
for help on using tickets.
Lines 124-127 in django/db/models/fields/files.py certainly seems to define a close method that ought to work. (The object that you get when you access a
FileField
from a model instance is actuallyFieldFile
). Closing "needsinfo" pending more detailed reproduction instructions.