App Engine Python SDK  v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
Public Member Functions | List of all members
google.appengine.ext.db.PropertiedClass Class Reference
Inheritance diagram for google.appengine.ext.db.PropertiedClass:
google.appengine.ext.db.polymodel.PolymorphicClass

Public Member Functions

def __init__
 

Detailed Description

Meta-class for initializing Model classes properties.

Used for initializing Properties defined in the context of a model.
By using a meta-class much of the configuration of a Property
descriptor becomes implicit.  By using this meta-class, descriptors
that are of class Model are notified about which class they
belong to and what attribute they are associated with and can
do appropriate initialization via __property_config__.

Duplicate properties are not permitted.

Constructor & Destructor Documentation

def google.appengine.ext.db.PropertiedClass.__init__ (   cls,
  name,
  bases,
  dct,
  map_kind = True 
)
Initializes a class that might have property definitions.

This method is called when a class is created with the PropertiedClass
meta-class.

Loads all properties for this model and its base classes in to a dictionary
for easy reflection via the 'properties' method.

Configures each property defined in the new class.

Duplicate properties, either defined in the new class or defined separately
in two base classes are not permitted.

Properties may not assigned to names which are in the list of
_RESERVED_WORDS.  It is still possible to store a property using a reserved
word in the datastore by using the 'name' keyword argument to the Property
constructor.

Args:
  cls: Class being initialized.
  name: Name of new class.
  bases: Base classes of new class.
  dct: Dictionary of new definitions for class.

Raises:
  DuplicatePropertyError when a property is duplicated either in the new
class or separately in two base classes.
  ReservedWordError when a property is given a name that is in the list of
reserved words, attributes of Model and names of the form '__.*__'.

The documentation for this class was generated from the following file: