mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #8175: don't open files we're about to close. This was a pesky bug to track down; thanks to charmless for tracking it down.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8637 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -40,5 +40,11 @@ if Image:
|
||||
>>> p.mug_width
|
||||
16
|
||||
|
||||
# Bug #8175: correctly delete files that have been removed off the file system.
|
||||
>>> import os
|
||||
>>> p2 = Person(name="Fred")
|
||||
>>> p2.mugshot.save("shot", ContentFile(image_data))
|
||||
>>> os.remove(p2.mugshot.path)
|
||||
>>> p2.delete()
|
||||
"""}
|
||||
|
||||
Reference in New Issue
Block a user