(self, localized=True)
return docDict
Return a dict representation of the document (copy).

        Removes _rev key.
Return a dict representation of the document (copy).
Return a dict representation of the document ( copy ) .
def toDict(self, localized=True):
        '''
        Return a dict representation of the document (copy).

        Removes _rev key.
        '''

        docDict = self.__dict__["_doc"].copy()

        if "_rev" in docDict:
            del docDict["_rev"]

        if localized and docDict.get("date", None):

            utc_date = get_date_from_db_date(docDict.get("date"))
            docDict["date"] = get_db_date_from_date(utc_date)

        return docDict
def toDict ( self , localized = True ) : docDict = self . __dict__ [ "_doc" ] . copy ( ) if "_rev" in docDict : del docDict [ "_rev" ] if localized and docDict . get ( "date" , None ) : utc_date = get_date_from_db_date ( docDict . get ( "date" ) ) docDict [ "date" ] = get_db_date_from_date ( utc_date ) return docDict