MCPcopy
hub / github.com/django/django / acreate

Method acreate

django/contrib/sessions/backends/db.py:81–92  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

79 return
80
81 async def acreate(self):
82 while True:
83 self._session_key = await self._aget_new_session_key()
84 try:
85 # Save immediately to ensure we have a unique entry in the
86 # database.
87 await self.asave(must_create=True)
88 except CreateError:
89 # Key wasn't unique. Try again.
90 continue
91 self.modified = True
92 return
93
94 def create_model_instance(self, data):
95 """

Callers 1

asaveMethod · 0.95

Calls 2

asaveMethod · 0.95
_aget_new_session_keyMethod · 0.80

Tested by

no test coverage detected