Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed #10404: ImageField height_field and width_field options no long…
…er depend on putting the image field after the height/width fields as they did after r9766. This bug actually exposed a related handful of inconsistancies in the underlying file handling and wraping, so a few related changes are in here as well: * Dimensions are also now calculated the moment the image is assigned to the field instead of upon save. * The base `File` object now when possible delegates its closed attribute down to the os-level file it wrapps. * In-memory files' `close()` now is a no-op. Without this certain APIs that should be able to handle in-memory files were failing. * Accessing `FieldFile.closed` used to open the file. That's silly, and it doesn't any more. * Some over-eager error handling was squishing some errors that would normally be raised. One unit test was incorrectly depending on this behavior, so the test was removed. Thanks to Armin Ronacher for much of this work. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10737 bcc190cf-cafb-0310-a4f2-bffc1f526a37
- Loading branch information
Showing
6 changed files
with
139 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters