#13809: FileField open method is only accepting 'rb' modes
------------------------------------+---------------------------------------
          Reporter:  canassa        |         Owner:  nobody
            Status:  reopened       |     Milestone:        
         Component:  Documentation  |       Version:  1.2   
        Resolution:                 |      Keywords:        
             Stage:  Accepted       |     Has_patch:  0     
        Needs_docs:  0              |   Needs_tests:  0     
Needs_better_patch:  0              |  
------------------------------------+---------------------------------------
Changes (by russellm):

  * component:  File uploads/storage => Documentation
  * stage:  Unreviewed => Accepted

Comment:

 I don't think it's unreasonable to expect that when you access a file
 through a model field, it will be open ready for reading. The best
 solution I can see here is documenting the fact that files are opened "rb"
 when accessed, and if you want to perform write operations, you'll need to
 close the file first.

 I'm open to any other suggestions, but I'll accept this as a documentation
 issue for now.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/13809#comment:3>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to