I am using pyamf with google app engine. I am trying to exclude a property from the pyamf encoding. This is the syntax I am using:
class Comment(db.Model):
class __amf__:
exclude = ('article')
article = db.ReferenceProperty(Article)
comment = db.TextProperty()
This does not work on the ReferenceProperty but if I try the exclude property with the 'comment' attribute it works. I noticed that the exclude property worked on a ReferenceProperty that did not contain a class with another ReferenceProperty attribute. In this case the Article class holds another ReferenceProperty to a another class. Any idea what could be the problem?
Thanks in advance
Your problem seems to be, at least partly, one of syntax -- you want the following:
Single parentheses without commas in them are just parenthesized expressions; they are evaluated earlier but do not mean "this is a tuple literal" -- that requires a colon.