MCPcopy
hub / github.com/django/django / is_empty

Method is_empty

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

Return True when there is no session_key and the session is empty.

(self)

Source from the content-addressed store, hash-verified

188 self.modified = True
189
190 def is_empty(self):
191 "Return True when there is no session_key and the session is empty."
192 try:
193 return not self._session_key and not self._session_cache
194 except AttributeError:
195 return True
196
197 def _get_new_session_key(self):
198 "Return session key that isn't being used."

Callers 3

__bool__Method · 0.95
process_responseMethod · 0.45
emptyMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected