sessions.backends.cached_db.SessionStore.cache_key_prefix

cache_key_prefix New in Django 1.9. A prefix added to a session key to build a cache key string.

sessions.backends.db.SessionStore

class backends.db.SessionStore Implements database-backed session store. classmethod get_model_class() New in Django 1.9. Override this method to return a custom session model if you need one. create_model_instance(data) New in Django 1.9. Returns a new instance of the session model object, which represents the current session state. Overriding this method provides the ability to modify session model data before it’s saved to database.

sessions.backends.db.SessionStore.create_model_instance()

create_model_instance(data) New in Django 1.9. Returns a new instance of the session model object, which represents the current session state. Overriding this method provides the ability to modify session model data before it’s saved to database.

sessions.base_session.AbstractBaseSession

class base_session.AbstractBaseSession New in Django 1.9. The abstract base session model. session_key Primary key. The field itself may contain up to 40 characters. The current implementation generates a 32-character string (a random sequence of digits and lowercase ASCII letters). session_data A string containing an encoded and serialized session dictionary. expire_date A datetime designating when the session expires. Expired sessions are not available to a user, however,

sessions.base_session.AbstractBaseSession.expire_date

expire_date A datetime designating when the session expires. Expired sessions are not available to a user, however, they may still be stored in the database until the clearsessions management command is run.

sessions.base_session.AbstractBaseSession.get_decoded()

get_decoded() Returns decoded session data. Decoding is performed by the session store class.

sessions.base_session.AbstractBaseSession.session_data

session_data A string containing an encoded and serialized session dictionary.

sessions.base_session.AbstractBaseSession.session_key

session_key Primary key. The field itself may contain up to 40 characters. The current implementation generates a 32-character string (a random sequence of digits and lowercase ASCII letters).

sessions.base_session.BaseSessionManager

class base_session.BaseSessionManager New in Django 1.9. encode(session_dict) Returns the given session dictionary serialized and encoded as a string. Encoding is performed by the session store class tied to a model class. save(session_key, session_dict, expire_date) Saves session data for a provided session key, or deletes the session in case the data is empty. Customization of SessionStore classes is achieved by overriding methods and properties described below:

sessions.base_session.BaseSessionManager.encode()

encode(session_dict) Returns the given session dictionary serialized and encoded as a string. Encoding is performed by the session store class tied to a model class.