views:

32

answers:

1
class FirstModel(db.Model):
    p = db.StringProperty({option:['aa','bb','cc']})

the error is :

NameError: name 'option' is not defined

what should i do ,thanks

+2  A: 

You should use:

p = db.StringProperty(choices=set(["aa", "bb", "cc"]))
systempuntoout
thanks very much
zjm1126