djangoflash.storage.cookie — Cookie-based flash storage

This module provides a cookie-based flash storage backend.

Warning

The actual FlashScope object is sent back to the user in a cookie. Although some encryption is performed to help spot when the flash data is modified by third-parties, this backend should be avoided when sensitive information is stored in the flash.

Warning

Although in general user agents’ cookie support should have no fixed limits, according to RFC-2965, section 5.3, all implementations must support at least 4096 bytes per cookie. So be careful about the amount of data you store in the flash when using this storage backend.

FlashStorageClass Class

class djangoflash.storage.cookie.FlashStorageClass

Bases: object

Cookie-based flash storage backend.

get(request)

Returns FlashScope object stored in a cookie.

set(flash, request, response)

Stores the given FlashScope object in a cookie.