MCPcopy
hub / github.com/django/django / exists

Method exists

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

Return True if the given session_key already exists.

(self, session_key)

Source from the content-addressed store, hash-verified

453 # Methods that child classes must implement.
454
455 def exists(self, session_key):
456 """
457 Return True if the given session_key already exists.
458 """
459 raise NotImplementedError(
460 "subclasses of SessionBase must provide an exists() method"
461 )
462
463 async def aexists(self, session_key):
464 return await sync_to_async(self.exists)(session_key)

Callers 1

_get_new_session_keyMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected