MCPcopy
hub / github.com/django/django / create

Method create

django/contrib/sessions/backends/base.py:466–474  ·  view source on GitHub ↗

Create a new session instance. Guaranteed to create a new object with a unique key and will have saved the result once (with empty data) before the method returns.

(self)

Source from the content-addressed store, hash-verified

464 return await sync_to_async(self.exists)(session_key)
465
466 def create(self):
467 """
468 Create a new session instance. Guaranteed to create a new object with
469 a unique key and will have saved the result once (with empty data)
470 before the method returns.
471 """
472 raise NotImplementedError(
473 "subclasses of SessionBase must provide a create() method"
474 )
475
476 async def acreate(self):
477 return await sync_to_async(self.create)()

Callers 1

cycle_keyMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected