module documentation

Undocumented

Function vary​_on​_cookie A view decorator that adds "Cookie" to the Vary header of a response. This indicates that a page's contents depends on cookies. Usage:
Function vary​_on​_headers A view decorator that adds the specified headers to the Vary header of the response. Usage:
def vary_on_cookie(func):

A view decorator that adds "Cookie" to the Vary header of a response. This indicates that a page's contents depends on cookies. Usage:

@vary_on_cookie def index(request):

...
def vary_on_headers(*headers):

A view decorator that adds the specified headers to the Vary header of the response. Usage:

@vary_on_headers('Cookie', 'Accept-language') def index(request):

...

Note that the header names are not case-sensitive.