class documentation

class Session4(Session):

Known subclasses: session4.modified_quix_demo.altdemo.DemoSession

Constructor: Session4(id)

View In Hierarchy

This adapts Quixote's own Session class to overwrite is_dirty() so that the session instance automatically detects changes to its values or additions or removals of members. Additional Instance attributes: _last_values : string the values of the session's attributes when it was last saved. is_dirty() uses this to compare with the current attributes (in memory) rendered as a string in order to automatically detect any added or changed attributes, including entries in things like lists and dictionaries (f'{vars(self)}' puts all the values into a string, which is handy to say the least). For fairly obvious reasons We remove _access_time and _last_values itself from the string to be stored.

Method __init__ Undocumented
Method is_dirty Undocumented
Method preserve_current_values Undocumented
Constant MAX_FORM_TOKENS Undocumented
Instance Variable _last_values Undocumented
def __init__(self, id: str | None):
def is_dirty(self) -> bool:

Undocumented

def preserve_current_values(self):

Undocumented

MAX_FORM_TOKENS: int =

Undocumented

Value
32
_last_values: str =

Undocumented