~panosl/+junk/django-attachments

« back to all changes in this revision

Viewing changes to README.rst

  • Committer: Martin Mahner
  • Date: 2010-04-03 00:15:39 UTC
  • mfrom: (29.1.1)
  • Revision ID: git-v1:d0bdc8597f531824a318c09900a3af8d1515f796
Merge remote branch 'dark/master' into mergetest

Conflicts:
        README.rst

Show diffs side-by-side

added added

removed removed

Lines of Context:
150
150
 
151
151
    mypicture = File(open('/home/aaron/mypicture.jpg', 'r'))
152
152
 
153
 
Finally, create the Attachment object and save it::
 
153
Finally, create the Attachment object and save it, and close the file handle::
154
154
 
155
155
    a = Attachment()
156
156
    a.creator = me
157
157
    a.attachment_file = mypicture
158
158
    a.save()
 
159
    mypicture.close()
159
160
 
160
161
Changelog:
161
162
==========