I have a simple scenario where there is a User class which has the name, email and followers property.
class User(ndb.Model):
name = ndb.StringProperty(required = True)
search_name = ndb.StringProperty(required = True)
pw_hash = ndb.StringProperty(required = True)
email = ndb.StringProperty()
follows = ndb.KeyProperty(Follow, repeated=True)
followers = ndb.KeyProperty(User, repeated=True)
While executing this I am getting the error.
File "C:\ujjal\my project\cravel\code2\Users.py", line 46, in User
followers = ndb.KeyProperty(User, repeated=True)
NameError: name 'User' is not defined
INFO 2012-09-11 11:45:23,953 dev_appserver.py:2967] "GET / HTTP/1.1" 500 -
Any suggestion as to how model the "followers" attribute would be highly appreciated. Thanks in Advance