Re: InMemoryUploadedFile no `encoding` Attribute

2013-01-15 Thread Braden Walters
Thanks to both of you. That actually makes a lot more sense now. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/ehJ4g2H8N3wJ. To post to this group, send

Re: InMemoryUploadedFile no `encoding` Attribute

2013-01-06 Thread nkryptic
The InMemoryUloadedFile has the following inheritance: django.core.files.uploadedfile.InMemoryUploadedFile - django.core.files.uploadedfile.UploadedFile --- django.core.files.base.File --django.core.files.utils.FileProxyMixin FileProxyMixin defines a propery "encoding", that simply calls

Re: InMemoryUploadedFile no `encoding` Attribute

2013-01-06 Thread Pedro J. Aramburu
I believe that as InMemoryUploadedFile is "InMemory", internally uses a cStringIO as the "container" for the file. So basically the class it's just a wrapper that returns the StringO object, a string representation of the file. You should check for the attributes of StringO or maybe use

InMemoryUploadedFile no `encoding` Attribute

2013-01-05 Thread Braden Walters
I've had a bit of an issue with InMemoryUploadedFile instances that come in request.FILES to a view. I passed one of them to another constructor to initialise it, and then I tried to access the `encoding` attribute (which appears in the help() for the class). I followed the class hierarchy and