Hi Neal,
djidjadji's response correctly demonstrates what the problem is: The
second argument to template.render should be a dictionary, not an
individual object. The error you're seeing is because Django is trying
to treat your TaskLog object as a dictionary. Change:
self.renderPage('templates/list.html', TaskLogs)
to:
self.renderPage('templates/list.html', {"TaskLogs": TaskLogs})
The other problem is that the 'TaskLogs' object is not a list - it's a
single TaskLog object (or None, if there were no entities that matched
your query). This is because you're calling .get() on the GqlQuery
object, which returns the first match. You should probably be calling
.fetch(limit).
-Nick Johnson
On Wed, May 20, 2009 at 5:04 AM, Neal <[email protected]> wrote:
>
> Tim,
> So you don't use templates at all? Or some other package?
> I loved what I saw of Django, but then tried to build a "vanilla"
> app on GAE. But all the books I had, when talking about templates,
> used the Django template parser.
>
> Thanks,
> Neal
>
>
> On May 19, 8:00 pm, Tim Hoffman <[email protected]> wrote:
>> HINeal
>>
>> I don't know anything about django - (I don't use it on gae) all I am
>> doing is pointing out what the error means
>> This probably means you are passing the wrong argument to something in
>> one of your templates.
>>
>> T
>>
>> On May 20, 3:30 am,Neal<[email protected]> wrote:
>>
>>
>>
>> > So basically, are you saying I have to change the Django code to get
>> > this work?
>> > If that's the case, surely everyone would be having the exact same
>> > problem???
>> > How do I find out if I'm up to date or not? I just installed GAE
>> > about a month ago.
>> > I'm using the django template lib that comes with GAE.
>>
>> >Neal- Hide quoted text -
>>
>> - Show quoted text -
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---