Django

Code

Show
Ignore:
Timestamp:
07/07/08 18:16:00 (5 months ago)
Author:
jacob
Message:

Fixed #7614: the quickening has come, and there now is only one UploadedFile?. On top of that, UploadedFile?'s interface has been improved:

  • The API now more closely matches a proper file API. This unfortunately means a few backwards-incompatible renamings; see BackwardsIncompatibleChanges. This refs #7593.
  • While we were at it, renamed chunk() to chunks() to clarify that it's an iterator.
  • Temporary uploaded files now property use the tempfile library behind the scenes which should ensure better cleanup of tempfiles (refs #7593 again).

Thanks to Mike Axiak for the bulk of this patch.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/tests/regressiontests/forms/fields.py

    r7814 r7859  
    801801 
    802802>>> type(f.clean(SimpleUploadedFile('name', 'Some File Content'))) 
    803 <class 'django.newforms.fields.UploadedFile'> 
     803<class 'django.core.files.uploadedfile.SimpleUploadedFile'> 
    804804 
    805805>>> type(f.clean(SimpleUploadedFile('name', 'Some File Content'), 'files/test4.pdf')) 
    806 <class 'django.newforms.fields.UploadedFile'> 
     806<class 'django.core.files.uploadedfile.SimpleUploadedFile'> 
    807807 
    808808# URLField ##################################################################