Utils
Utils - A set of auxiliary methods for a commons module.
correct_mongo_filter(cls_model, filter, lang_code)
¶
Correcting filter of request.
Corrects TextField fields that require localization of translation.
Source code in src/ramifice/commons/utils.py
mongo_doc_to_model_dict(cls_model, mongo_doc, lang_code, utc_timezone)
¶
Convert Mongo document to Model document.
Special changes
_id to id (str)password to Nonedate to strdatetime to str
Source code in src/ramifice/commons/utils.py
password_to_none(field_name_and_type, mongo_doc)
¶
In the Mongo document, set all passwords to None.