On Wed, Jun 8, 2011 at 2:51 PM, Daniel Roseman wrote:
> But that "bunch of image data" is a string - because that's what .read()
> returns.
> The FileField documentation [1] shows how to save a disk file to a field:
> from django.core.files import File
> f = open('/tmp/hello.world')
>
On Wednesday, 8 June 2011 20:40:35 UTC+1, Greg Donald wrote:
>
> I have a model EventType that has an ImageField named image.
>
> When I post my image upload form I can upload an image with no problems.
>
>
> But when I try to save() an image from the file system I get the error:
>
> 'str' object h
I have a model EventType that has an ImageField named image.
When I post my image upload form I can upload an image with no problems.
But when I try to save() an image from the file system I get the error:
'str' object has no attribute 'chunks'
Here is my code:
et = EventType( name=name )
et
3 matches
Mail list logo