class CookieStorage(BaseStorage):
Method | __init__ |
Undocumented |
Method | _decode |
Safely decode an encoded text stream back into a list of messages. |
Method | _encode |
Return an encoded version of the messages list which can be stored as plain text. |
Method | _get |
No summary |
Method | _store |
Store the messages to a cookie and return a list of any messages which could not be stored. |
Method | _update_cookie |
Either set the cookie with the encoded data if there is any data to store, or delete the cookie. |
Class Variable | cookie_name |
Undocumented |
Class Variable | key_salt |
Undocumented |
Class Variable | max_cookie_size |
Undocumented |
Class Variable | not_finished |
Undocumented |
Instance Variable | signer |
Undocumented |
Instance Variable | used |
Undocumented |
Inherited from BaseStorage
:
Method | __contains__ |
Undocumented |
Method | __iter__ |
Undocumented |
Method | __len__ |
Undocumented |
Method | __repr__ |
Undocumented |
Method | _get_level |
Return the minimum recorded level. |
Method | _prepare_messages |
Prepare a list of messages for storage. |
Method | _set_level |
Set a custom minimum recorded level. |
Method | add |
Queue a message to be stored. |
Method | update |
Store all unread messages. |
Class Variable | level |
Undocumented |
Instance Variable | _level |
Undocumented |
Instance Variable | _queued_messages |
Undocumented |
Instance Variable | added_new |
Undocumented |
Instance Variable | request |
Undocumented |
Property | _loaded_messages |
Return a list of loaded messages, retrieving them first if they have not been loaded yet. |
Safely decode an encoded text stream back into a list of messages.
If the encoded text stream contained an invalid hash or was in an invalid format, return None.
Return an encoded version of the messages list which can be stored as plain text.
Since the data will be retrieved from the client-side, the encoded data also contains a hash to ensure that the data was not tampered with.
Store the messages to a cookie and return a list of any messages which could not be stored.
If the encoded data is larger than max_cookie_size, remove messages until the data fits (these are the messages which are returned), and add the not_finished sentinel value to indicate as much.