class documentation

Base class for documents that are written to the database in their own collections.

The ID of a document is automatically populated when it is added to the database, and the ID of a document is None if it has not been added to the database.

Method __eq__ Undocumented
Instance Variable id the ID of the document, or None if it has not been added to the database
Property in_db Whether the document has been inserted into the database.
Method _get_repr_fields Returns an ordered tuple of field names that should be included in the repr of the document.

Inherited from MongoEngineBaseDocument:

Class Method from_dict Loads the document from a BSON/JSON dictionary.
Method __deepcopy__ Undocumented
Method __delattr__ Undocumented
Method __delitem__ Undocumented
Method clear_field Clears the field from the document.
Method field_to_mongo Undocumented
Method field_to_python Undocumented
Method get_field Gets the field of the document.
Method has_field Determines whether the document has a field of the given name.
Method set_field Sets the value of a field of the document.
Method to_dict Serializes this document to a BSON/JSON dictionary.
Property field_names An ordered tuple of the public fields of this document.
Method _get_field Undocumented
Method _get_field_names Returns an ordered tuple of field names of this document.
Method _to_db_fields Undocumented
Instance Variable _fields_ordered Undocumented

Inherited from SerializableDocument (via MongoEngineBaseDocument):

Class Method from_json Loads the document from a JSON string.
Method __repr__ Undocumented
Method __str__ Undocumented
Method copy Returns a deep copy of the document.
Method fancy_repr Generates a customizable string representation of the document.
Method iter_fields Returns an iterator over the (name, value) pairs of the public fields of the document.
Method merge Merges the contents of the given document into this document.
Method to_json Serializes the document to a JSON string.

the ID of the document, or None if it has not been added to the database

Whether the document has been inserted into the database.

def _get_repr_fields(self): (source)

Returns an ordered tuple of field names that should be included in the repr of the document.

Returns
a tuple of field names