MCPcopy
hub / github.com/jazzband/django-constance / mget

Method mget

constance/backends/database.py:61–72  ·  view source on GitHub ↗
(self, keys)

Source from the content-addressed store, hash-verified

59 self._cache.set_many(autofill_values, timeout=self._autofill_timeout)
60
61 def mget(self, keys):
62 result = {}
63 if not keys:
64 return result
65 keys = {self.add_prefix(key): key for key in keys}
66 try:
67 stored = self._model._default_manager.filter(key__in=keys)
68 for const in stored:
69 result[keys[const.key]] = loads(const.value)
70 except (OperationalError, ProgrammingError):
71 pass
72 return result
73
74 def get(self, key):
75 key = self.add_prefix(key)

Callers 1

autofillMethod · 0.95

Calls 2

add_prefixMethod · 0.95
loadsFunction · 0.90

Tested by

no test coverage detected