>From the docs:
The return value is a list of model instances, possibly an empty
list
I have similar code and it works fine. Try debugging it, does the
fetch() method return anything? Also, you need to provide the limit
parameter to fetch().
On Sep 18, 4:42 pm, Sam G <[EMAIL PROTECTED]> wrote:
> Hello GAE Group,
>
> I'm a bit confused about a key aspect of the Datastore functionality.
> When you use the fetch() method (and it returns multiple records), how
> is it returned?
>
> In a dict, or a list, or something else?
>
> I'm trying to do this in a template:
>
> {% for Message in messages %}
>
> <p>{{ Message.sender }}</p>
> <p>{{ Message.subject }}</p>
>
> {% endfor %}
>
> Meanwhile, I have passed the variable 'messages':getmessages.fetch()
> to the template. This, of course, does not work.
>
> Is there a way to convert it to whatever I need to enable me to
> display it in such a way?
>
> Sam
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---