I really didn’t know how to write the title for this problem 😛
So in google app engine I want to create a class that can have ‘sons’ of the same type:
class Chapter(db.Model):
title = db.StringProperty(required=True)
note = db.TextProperty()
father = db.ReferenceProperty(Chapter, collection_name='sons')
order = db.IntegerProperty(default=0)
and I get the error
NameError: name 'Chapter' is not defined
Is it possible to create this? Or is this a really stupid idea?
You need to use SelfReferenceProperty