how to get all 'username' from my model 'MyUser' on google-app-engine ..
Posted
by zjm1126
on Stack Overflow
See other posts from Stack Overflow
or by zjm1126
Published on 2010-06-05T10:21:24Z
Indexed on
2010/06/05
10:32 UTC
Read the original article
Hit count: 150
my model is :
class MyUser(db.Model):
user = db.UserProperty()
password = db.StringProperty(default=UNUSABLE_PASSWORD)
email = db.StringProperty()
nickname = db.StringProperty(indexed=False)
and my method which want to get all username is :
s=[]
a=MyUser.all().fetch(10000)
for i in a:
s.append(i.username)
and the error is :
AttributeError: 'MyUser' object has no attribute 'username'
so how can i get all 'username',
which is the simplest way .
thanks
© Stack Overflow or respective owner