Django

Code

Show
Ignore:
Timestamp:
07/07/08 18:16:00 (6 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/django/db/models/base.py

    r7846 r7859  
    537537            fp = open(full_filename, 'wb') 
    538538            locks.lock(fp, locks.LOCK_EX) 
    539             for chunk in raw_field.chunk(): 
     539            for chunk in raw_field.chunks(): 
    540540                fp.write(chunk) 
    541541            locks.unlock(fp)