I want to require that one of my model classes specify my own custom key as the key_name, that way I can always rely on it being there. How can I require this? For example, I may have a model class such as:
class Account(db.Model):
user = db.UserProperty(required=True)
email = db.EmailProperty()
And I want to require that key_name is always specified, requiring instantiation in a manner such as the following:
user_obj = users.get_current_user()
new_user = Account(user=user_obj, key_name=user.user_id())
new_user.put()
How can this be done? Thanks in advance