Changes between Version 175 and Version 176 of BackwardsIncompatibleChanges


Ignore:
Timestamp:
Jul 1, 2008, 10:11:36 AM (16 years ago)
Author:
Jacob
Comment:

Added details about [7814]

Legend:

Unmodified
Added
Removed
Modified
  • BackwardsIncompatibleChanges

    v175 v176  
    6161 * [7799] June 30, 2008 [#BooleanFieldsinnewformsenforcerequired BooleanFields in newforms enforce "required"]
    6262 * [7806] June 30, 2008 [#DefaultUserorderingremoved Default User ordering removed]
     63 * [7814] July 1, 2008 [#Uploadedfilechanges Uploaded file changes]
    6364
    6465== Database constraint names changed ==
     
    347348>>> management.call_command('loaddata', 'test_data', verbosity=0)
    348349}}}
     350
    349351
    350352
     
    647649
    648650Note that the admin interface will still behave the same as prior to this change, since it automatically orders the users by their name, just as before. So no change will be noticable there.
     651
     652== Uploaded file changes ==
     653
     654[7814] introduced changes to the way Django handles uploadded files. Most of the changes are in the form of added flexibility and performance (for details, see the [http://www.djangoproject.com/documentation/upload_handing/ upload handling documentation]).
     655
     656However, as part of the change, the representation of uploaded files has changed. Previous, uploadded files -- that is, entries in {{{request.FILES}}} -- were represented by simple dictionaries with a few well-known keys. Uploaded files are now represented by an [http://www.djangoproject.com/documentation/upload_handing/#uploaded-file-objects UploadedFile object], and thus the file's information is accessible through object attributes. Thus, given {{{f = request.FILES['some_field_name']}}}:
     657
     658|| '''Old'''                            || '''New'''                    ||
     659|| {{{f['content']}}}           || {{{f.read()}}}               ||
     660|| {{{f['filename']}}}          || {{{f.file_name}}}    ||
     661|| {{{f['content-type']}}}      || {{{f.content_type}}} ||
     662
     663The old dictionary-style key access is still supported, but will raise a {{{DeprecationWarning}}}.
Back to Top