class documentation
class CookieStorage(BaseStorage): (source)
Store messages in a cookie.
Method | __init__ |
Undocumented |
Class Variable | cookie |
Undocumented |
Class Variable | key |
Undocumented |
Class Variable | max |
Undocumented |
Class Variable | not |
Undocumented |
Instance Variable | signer |
Undocumented |
Instance Variable | used |
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 |
Retrieve a list of messages from the messages cookie. If the not_finished sentinel value is found at the end of the message list, remove it and return a result indicating that not all messages were retrieved by this storage. |
Method | _store |
Store the messages to a cookie and return a list of any messages which could not be stored. |
Method | _update |
Either set the cookie with the encoded data if there is any data to store, or delete the cookie. |
Inherited from BaseStorage
:
Method | __contains__ |
Undocumented |
Method | __iter__ |
Undocumented |
Method | __len__ |
Undocumented |
Method | __repr__ |
Undocumented |
Method | add |
Queue a message to be stored. |
Method | update |
Store all unread messages. |
Class Variable | level |
Undocumented |
Instance Variable | added |
Undocumented |
Instance Variable | request |
Undocumented |
Method | _get |
Return the minimum recorded level. |
Method | _prepare |
Prepare a list of messages for storage. |
Method | _set |
Set a custom minimum recorded level. |
Instance Variable | _level |
Undocumented |
Instance Variable | _queued |
Undocumented |
Property | _loaded |
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.
Retrieve a list of messages from the messages cookie. If the not_finished sentinel value is found at the end of the message list, remove it and return a result indicating that not all messages were retrieved by this storage.