From c65d068d5531ea979c86eacc047326b87f7f227c Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Fri, 2 Oct 2015 16:04:47 -0400 Subject: [PATCH] Add note about wanting to use register_connection I think this would be the cleaner way to go about things but there are some unanswered questions about that route. --- awx/fact/models/fact.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/awx/fact/models/fact.py b/awx/fact/models/fact.py index 0342ee94ba..ba88104e55 100644 --- a/awx/fact/models/fact.py +++ b/awx/fact/models/fact.py @@ -18,6 +18,8 @@ logger = logging.getLogger('awx.fact.models.fact') key_transform = KeyTransform([('.', '\uff0E'), ('$', '\uff04')]) +# NOTE: I think it might be better to use register_connection here: https://github.com/MongoEngine/mongoengine/blob/0.9/mongoengine/connection.py#L21 +# but I'm not doing that because I don't see how we can also register the key transform as needed or set the tz_aware preference @classmethod def _get_db_monkeypatched(cls): """ Override the default _get_db mechanism to start a connection to the database """