I have an nbd model defined as such:
class Attachment(ndb.Model):
id = ndb.StringProperty(indexed=True)
mime_type = ndb.StringProperty()
contents = ndb.StringProperty()
modified_date = ndb.DateTimeProperty(auto_now_add=True)
def __init__(self, *args, **kwargs):
super(Attachment, self).__init__(*args, **kwargs)
As per documentation and coincidentally BDFL's direction, you can overwrite __init__
in a ndb.Model subclass by calling the above super()
; however, every time I'm trying to create a new instance as follows:
Attachment(id='such',mime_type='img/jpeg')
keeps throwing errors that those args are unexpected.
What am I missing? Your help is much appreciated.