This shouldn't be backwards incompatible, just implementing the
__exit__ and __enter__ methods.
Use case:
class Obj(models.Model):
file_field = models.FileField(upload_to="test")
...
obj = Obj()
obj.file_field.save(filename, content)
...
with obj.file_field.open() as a_file:
a_file.read()
Any reason I shouldn't make a ticket and patch for this?
- Martin Chase
--
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-developers?hl=en.