Alex,
I've tested this block of code. It told me I had to provide the two
parameters (which I did), and it is still not working quite right.
There are three "Messages" in the datastore, and on the page is does
display three <p> blocks. It just doesn't display any information...
I'll take another look.
On Sep 17, 11:05 pm, Alexander Kojevnikov <[EMAIL PROTECTED]>
wrote:
> 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
-~----------~----~----~----~------~----~------~--~---