This is the model:
class Rep(db.Model):
author = db.UserProperty()
replist = db.ListProperty(str)
unique = db.ListProperty(str)
date = db.DateTimeProperty(auto_now_add=True)
I am writing replist
to datastore:
L = []
rep = Rep()
s = self.request.get('sentence')
L.append(s)
rep.replist = L
rep.put()
and retrieve
mylist = rep.all().fetch(1)
I assume that mylist
is a list. How do I print its elements? When I try it I end up with the object; something like [<__main__.Rep object at 0x04593C30>]
Thanks!
EDIT
@Wooble: I use templates too. What I don't understand is that; I print the list L
like this:
% for i in range(len(L)):
<tr>
<td>${L[i]}</td>
</tr>
% endfor
And this works. But the same thing for mylist
does not work. And I tried to get the type of mylist
with T = type(mylist)
that did not work either.