I tried doing the following
class SomeModel(db.Model):
prev = db.ReferenceProperty(SomeModel)
next = db.ReferenceProperty(SomeModel)
but got the following error
NameError: name 'TrackPointModel' is not defined
Is there a way of doing this?
Yes, you can use a SelfReferenceProperty
class SomeModel(db.Model):
prev = db.SelfReferenceProperty()
next = db.SelfReferenceProperty()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With