SessionMixin
Expands a basic dictionary with session attributes.
Attributes
| Attribute | Type | Description |
|---|---|---|
| new | bool = False | Some implementations can detect whether a session is newly created, but that is not guaranteed. |
| modified | bool = True | Some implementations can detect changes to the session and set this when that happens. |
| accessed | bool = False | Indicates if the session was accessed, even if it was not modified, and triggers the addition of a Vary: cookie header if True. |
Methods
permanent()
@classmethod
def permanent() - > bool
This reflects the '_permanent' key in the dict.
Returns
| Type | Description |
|---|---|
bool | True if the session is marked as permanent, otherwise False |
permanent()
@classmethod
def permanent(
value: bool
) - > None
Sets the permanent status of the session by updating the internal '_permanent' key.
Parameters
| Name | Type | Description |
|---|---|---|
| value | bool | A boolean flag indicating whether the session should persist across browser restarts |
Returns
| Type | Description |
|---|---|
None | null |