Perform a fetch() or get() on the GQLQuery object before accessing the
objects as a list.
IMG = PROFILES.gql("WHERE name = :1",nameId).fetch(10)
2009/9/15 Larkin2 <[email protected]>:
>
> Actually, I take that back:
>
> class avatar(webapp.RequestHandler):
> def get(self,nameId='Larkin'):
> IMG = PROFILES.gql("WHERE name = :1",nameId)
> if (IMG[0].smallAvatar):
> self.response.headers['Content-Type'] = "image/jpg"
> self.response.out.write(IMG[0].smallAvatar)
> else:
> self.error(404)
>
> with: (r'/avatar/(.*)',avatar),
>
> doesn't seem to work...
>
> basically /avatar/ doesn't return the same thing as /avatar/Larkin
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google App Engine" 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/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---