View source on GitHub |
Convert model to dictionary.
google.appengine.ext.db.to_dict(
model_instance, dictionary=None
)
Args | |
---|---|
model_instance
|
Model instance for which to make dictionary.
|
dictionary
|
dict instance or compatible to receive model values.
The dictionary is not cleared of original values. Similar to using
dictionary.update . If dictionary is None , a new dictionary instance
is created and returned.
|
Returns | |
---|---|
New dictionary appropriate populated with model instances values
if entity is None , else entity.
|