Hi

I am in my application to insert images in GridFS.
And I can go search them by name or id of the record that contains the 
photo, like this:
*my_painting Painting.objects = (id = '51938efa8774a71a20e6d69e '). first ()
*
*my_painting.photo.read print ()*

Now if I want to see the image by image id how can I do?
I tried to do so:
*my_painting = Painting.objects (photo = '51938efa8274a71a34e6d69e '). 
first ()*
*my_painting.photo.read print ()*

But it gives me the following error: *'QuerySet' object has no attribute 
'photo'*
*
*
Then I tried this:
*my_painting = Painting.photo ('51938efa8774a71a20e6d69c ')*
*my_painting.photo.read print ()*

But it gives me the error: *'FileField' object is not callable*

How can I access the photo will your id?
Someone can help me?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to