Hi,
I've written a form ImageField that is cropable with the help of a
javascript cropper. In the course of saving the cropped image, I have
to reopen the image file a couple of times in different modes in the
"clean"-method of the ImageField. Unfortunately, despite the docs
saying something different[1], the file isn't reopened with a
different mode:
In [1]: from django.core.files import File
In [2]: f = open('test.txt', 'r')
In [3]: df = File(f)
In [4]: df.mode
Out[4]: 'r'
In [5]: df.open(mode='w')
In [6]: df.mode
Out[6]: 'r'
Am I doing something wrong here?
Regards,
Benjamin
[1]
http://docs.djangoproject.com/en/dev/ref/files/file/#django.core.files.File.open
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" 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-users?hl=en
-~----------~----~----~----~------~----~------~--~---